Skip to content

Commit 4b9df90

Browse files
roypatbchalios
authored andcommitted
devtool: add download_ci_artifacts command
Every now and then, I managed to end up with an empty CI artifacts folder, for whatever reason (mostly me being silly). The solution is generally to remove whatever messed up stuff I ended up with in build/img, and run some arbitrary devtool command that I know will redownload everything. Similar workflows must happen whenever we do an in-place update of our CI artifacts. Abstract this away into a command that deletes the build/img folder, and then redownloads it. Signed-off-by: Patrick Roy <[email protected]>
1 parent aed4abe commit 4b9df90

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tools/devtool

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,10 @@ cmd_help() {
418418
echo " Builds the rootfs and guest kernel artifacts we use for our CI."
419419
echo " Run './tools/devtool build_ci_artifacts help' for more details about the available commands."
420420
echo ""
421+
echo " download_ci_artifacts [--force]"
422+
echo " Downloads the CI artifacts used for testing from our S3 bucket. If --force is passed, purges any existing"
423+
echo " artifacts first. Useful for refreshing local artifacts after an update, or if something got messed up."
424+
echo ""
421425

422426
cat <<EOF
423427
test_debug [-- [<pytest args>]]
@@ -555,6 +559,14 @@ cmd_distclean() {
555559
fi
556560
}
557561

562+
cmd_download_ci_artifacts() {
563+
if [ "$1" = "--force" ]; then
564+
rm -rf $FC_BUILD_DIR/img
565+
fi
566+
567+
ensure_ci_artifacts
568+
}
569+
558570
ensure_ci_artifacts() {
559571
if ! command -v aws >/dev/null; then
560572
die "AWS CLI not installed, which is required for downloading artifacts for integration tests."

0 commit comments

Comments
 (0)