-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[ci] Don't trigger BK PR jobs on pushes #15426
Conversation
Currently while PR jobs get triggered as expected in Buildkite via the bot, they also get re-triggered after something gets pushed, including e.g. the squash merge commit when the PR is merged. This commit disables this behavior as documented in Buildkite[^1]. Relates: - elastic#15402 - elastic/ingest-dev#1721 [^1]: https://buildkite.com/docs/apis/rest-api/pipelines
catalog-info.yaml
Outdated
@@ -243,7 +243,8 @@ spec: | |||
provider_settings: | |||
build_pull_request_forks: false | |||
build_pull_requests: true # requires filter_enabled and filter_condition settings as below when used with buildkite-pr-bot | |||
build_tags: true | |||
build_branches: false | |||
build_tags: false | |||
filter_enabled: true | |||
filter_condition: >- | |||
build.pull_request.id == null || (build.creator.name == 'elasticmachine' && build.pull_request.id != null) |
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.
This might need adjustment as well. As the filter condition indicates, it will allow the pipeline to trigger when there is no build.pull_request.id
which is the case of a branch commit in the base branch, and allow to trigger the pipeline when the creator iselasticmachine
for the event of a PR.
I would change this and keep only the right side of the ||
meaning
build.pull_request.id == null || (build.creator.name == 'elasticmachine' && build.pull_request.id != null) | |
build.creator.name == 'elasticmachine' && build.pull_request.id != null |
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.
Thank you! Addressed in d23aa37
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.
As discussed offline, I left build_branches
and build_tags
set to false
as well.
SonarQube Quality Gate |
Release notes
[rn:skip]
What does this PR do?
Currently while PR jobs get triggered as expected in Buildkite via the bot, they also get re-triggered after something gets pushed, including e.g. the squash merge commit when the PR is merged.
This commit disables this behavior as documented in Buildkite1.
Related issues
Footnotes
https://buildkite.com/docs/apis/rest-api/pipelines ↩