-
Notifications
You must be signed in to change notification settings - Fork 113
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
buildkite: Add dynamic pipeline generator for conditional skipping #2702
Conversation
50a9bdd
to
4a66973
Compare
Codecov Report
@@ Coverage Diff @@
## master #2702 +/- ##
==========================================
+ Coverage 63.09% 63.20% +0.11%
==========================================
Files 377 377
Lines 35448 35448
==========================================
+ Hits 22365 22405 +40
+ Misses 10273 10240 -33
+ Partials 2810 2803 -7
Continue to review full report at Codecov.
|
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.
Should we also remove buildkite/scripts/skip_if_only_docs_changes.sh
(and its use) now?
4a66973
to
308dd81
Compare
Use Buildkite's dynamic pipelines feature to dynamically choose between Code/Code-skip pipelines depending on whether the build was triggered for a pull request and the list of changes files.
308dd81
to
209b0a3
Compare
Yes, good catch. Done. |
# are no code-related changes compared to the pull request's base branch. | ||
pr_and_no_code_related_changes() { | ||
# Check if the build was triggered for a pull request. | ||
if [[ -z $BUILDKITE_PULL_REQUEST_BASE_BRANCH ]]; 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.
can't skip in this case:
- we should build on master for PR merge commits, because there are steps that are set to run on master only
- you'd normally push a branch first and then open a PR for it. that first push wouldn't be built under this rule, because a PR doesn't exist yet
I'm afraid I don't understand. So, for non-pull-request builds, the full code pipeline will always be run. For an example, see the recent builds for the
Yes, as I announced internally, I needed to make a slight Buildkite triggering change:
This is needed since the dynamic Buildkite pipeline needs to know the base branch and changes from it to decide whether to run the full code pipeline or skip it. |
oh ok then thanks |
Use Buildkite's dynamic pipelines feature to dynamically choose between Code/Code-skip pipelines depending on whether the build was triggered for a pull request and the list of changes files.
Closes #2573.