Append BRANCH_PATH to filenames of build output
This adds $BRANCH_PATH (from the dependent patch) to the file names of the build output, so that we can upload images for each branch we maintain. Change-Id: I8c767fa1b56a566c1acabab8552a51ffeb4e1d7d Depends-On: I540d2f139c80bb7f382315258dbe3a7a14be74c8 Partial-Bug: #1561756
This commit is contained in:
parent
be16b14811
commit
7862d14580
@ -4,6 +4,7 @@
|
||||
# suitable for use in testing or production.
|
||||
#
|
||||
|
||||
BRANCH_PATH=${BRANCH_PATH:-master}
|
||||
# NOTE(lucasagomes): List of dependencies for Red Hat systems
|
||||
REDHAT_PACKAGES="docker-io gpg"
|
||||
|
||||
@ -24,4 +25,19 @@ fi
|
||||
imagebuild/coreos/build_coreos_image.sh
|
||||
|
||||
BUILD_DIR=imagebuild/coreos/UPLOAD
|
||||
tar czf ipa-coreos.tar.gz $BUILD_DIR/coreos_production_pxe_image-oem.cpio.gz $BUILD_DIR/coreos_production_pxe.vmlinuz
|
||||
if [ "$BRANCH_PATH" != "master" ]; then
|
||||
# add the branch name
|
||||
mv $BUILD_DIR/coreos_production_pxe_image-oem.cpio.gz $BUILD_DIR/coreos_production_pxe_image-oem-$BRANCH_PATH.cpio.gz
|
||||
mv $BUILD_DIR/coreos_production_pxe.vmlinuz $BUILD_DIR/coreos_production_pxe-$BRANCH_PATH.vmlinuz
|
||||
else
|
||||
# in the past, we published master without branch name
|
||||
# copy the files in this case such that both are published
|
||||
cp $BUILD_DIR/coreos_production_pxe_image-oem.cpio.gz $BUILD_DIR/coreos_production_pxe_image-oem-$BRANCH_PATH.cpio.gz
|
||||
cp $BUILD_DIR/coreos_production_pxe.vmlinuz $BUILD_DIR/coreos_production_pxe-$BRANCH_PATH.vmlinuz
|
||||
fi
|
||||
|
||||
tar czf ipa-coreos-$BRANCH_PATH.tar.gz $BUILD_DIR/coreos_production_pxe_image-oem-$BRANCH_PATH.cpio.gz $BUILD_DIR/coreos_production_pxe-$BRANCH_PATH.vmlinuz
|
||||
if [ "$BRANCH_PATH" = "master" ]; then
|
||||
# again, publish with and without the branch on master for historical reasons
|
||||
cp ipa-coreos-$BRANCH_PATH.tar.gz ipa-coreos.tar.gz
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user