-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid git commands when running against a fork #3095
Avoid git commands when running against a fork #3095
Conversation
buildkite test this |
buildkite test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
@@ -34,3 +34,11 @@ is_pr() { | |||
return 0 # true | |||
fi | |||
} | |||
|
|||
is_fork() { | |||
if [ "BUILDKITE_PULL_REQUEST_REPO" = "https://github.com/elastic/connectors.git"]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 is false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun unix stuff :D Functions actually return exit codes, not regular variables:
https://stackoverflow.com/questions/17336915/return-value-in-a-bash-function
So 0 = "all good", non-0 are "something is wrong"
💔 Failed to create backport PR(s)The backport operation could not be completed due to the following error: The backport PRs will be merged automatically after passing CI. To backport manually run: |
See failure of CI in PR #3090: https://buildkite.com/elastic/connectors/builds/15589#01945040-19d0-4239-915a-173479f8aee8
I happens because forks are not known to Buildkite agent. Forks will not by default give permissions to Elasitc agents, so we cannot really push anything into them. This PR just makes forks treated same way we treat
main
branch: just report failures, don't try to fix them.