From 02bc3c9962f8d80a239bba1a6c8bd97d1c5ba44c Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Mon, 8 Oct 2018 09:06:10 -0400 Subject: Fix Cirrus/Packer VM image building An invalid GCE value is being passed to packer, preventing it from building VM images. Fix this, and centralize the definition of the image name suffix by setting it at ``setup_environment.sh`` call-time, rather encoding inside packer's `libpod_images.json`. This makes the value available for use by other scripts. Also, switch the unique component of the name, to be based on the commit-sha being tested. This will improve traceability, since the git history is more permanent than the `CIRRUS_BUILD_ID` env. var. The later is subject to log-rotation, destroying evidence of the images source state. Signed-off-by: Chris Evich --- contrib/cirrus/setup_environment.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'contrib/cirrus/setup_environment.sh') diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index 2302f0e15..167db127f 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -41,6 +41,7 @@ then "export OS_RELEASE_ID=\"$(os_release_id)\"" \ "export OS_RELEASE_VER=\"$(os_release_ver)\"" \ "export OS_REL_VER=\"${OS_RELEASE_ID}-${OS_RELEASE_VER}\"" \ + "export BUILT_IMAGE_SUFFIX=\"-$CIRRUS_REPO_NAME-${CIRRUS_CHANGE_IN_REPO:0:8}\"" \ "export GOPATH=\"/go\"" \ 'export PATH="$HOME/bin:$GOPATH/bin:/usr/local/bin:$PATH"' \ 'export LD_LIBRARY_PATH="/usr/local/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"' -- cgit v1.2.3-54-g00ecf