-
Notifications
You must be signed in to change notification settings - Fork 2.1k
chore(buildkite): add pipeline definition for release QA #5425
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
Merged
+78
−2
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
.buildkite/pipeline_release_qa.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
""" | ||
Buildkite pipeline for release QA | ||
""" | ||
|
||
from common import BKPipeline | ||
|
||
pipeline = BKPipeline(with_build_step=False) | ||
|
||
# NOTE: we need to escape $ using $$ otherwise buildkite tries to replace it instead of the shell | ||
|
||
pipeline.add_step( | ||
{ | ||
"label": "Download release", | ||
"if": 'build.env("VERSION") != "dev"', | ||
"command": [ | ||
"aws s3 sync --no-sign-request s3://spec.ccfc.min/firecracker-ci/firecracker/$$VERSION release-$$VERSION", | ||
'buildkite-agent artifact upload "release-$$VERSION/**/*"', | ||
], | ||
}, | ||
depends_on_build=False, | ||
) | ||
|
||
pipeline.build_group_per_arch( | ||
":building_construction: Make release", | ||
# if is a keyword for python, so we need this workaround to expand it as a kwarg | ||
**{"if": 'build.env("VERSION") == "dev"'}, | ||
command=[ | ||
"./tools/devtool -y make_release", | ||
"RELEASE_DIR=$$(echo release-*dev-$$(uname -m))", | ||
"RELEASE_SUFFIX=$${{RELEASE_DIR#release}}", | ||
"OUT_DIR=release-$$VERSION/$$(uname -m)", | ||
"mkdir -p $$OUT_DIR", | ||
( | ||
"for f in $$RELEASE_DIR/*-$$(uname -m); do" | ||
" mv $$f $$OUT_DIR/$$(basename $$f $$RELEASE_SUFFIX);" | ||
" mv $$f.debug $$OUT_DIR/$$(basename $$f $$RELEASE_SUFFIX).debug;" | ||
"done" | ||
), | ||
'buildkite-agent artifact upload "release-$$VERSION/**/*"', | ||
], | ||
depends_on_build=False, | ||
) | ||
|
||
# The devtool expects the examples to be in the same folder as the binaries to run some tests | ||
# (for example, uffd handler tests). Build them and upload them in the same folder. | ||
pipeline.build_group_per_arch( | ||
":hammer_and_wrench: Build examples", | ||
command=[ | ||
"CARGO_TARGET=$$(uname -m)-unknown-linux-musl", | ||
"./tools/devtool -y sh cargo build --target $$CARGO_TARGET --release --examples", | ||
"mkdir -p release-$$VERSION/$$(uname -m)/", | ||
"cp -R build/cargo_target/$$CARGO_TARGET/release/examples release-$$VERSION/$$(uname -m)/", | ||
'buildkite-agent artifact upload "release-$$VERSION/**/*"', | ||
], | ||
depends_on_build=False, | ||
) | ||
|
||
pipeline.add_step("wait", depends_on_build=False) | ||
|
||
pipeline.add_step( | ||
{ | ||
"label": ":pipeline: PR", | ||
"command": ( | ||
".buildkite/pipeline_pr.py --binary-dir release-$$VERSION " | ||
"| jq '(..|select(.priority? != null).priority) += 100' " | ||
"| buildkite-agent pipeline upload" | ||
), | ||
}, | ||
depends_on_build=False, | ||
) | ||
|
||
print(pipeline.to_json()) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.