diff options
author | Chris Evich <cevich@redhat.com> | 2018-10-08 09:06:10 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2018-10-18 12:37:08 -0400 |
commit | 02bc3c9962f8d80a239bba1a6c8bd97d1c5ba44c (patch) | |
tree | ed03e5aad9042750fed9a6e062e2fabd5327cfd1 /contrib/cirrus/lib.sh | |
parent | a75a888640efcbecdf80caac3004957d6b0752ed (diff) | |
download | podman-02bc3c9962f8d80a239bba1a6c8bd97d1c5ba44c.tar.gz podman-02bc3c9962f8d80a239bba1a6c8bd97d1c5ba44c.tar.bz2 podman-02bc3c9962f8d80a239bba1a6c8bd97d1c5ba44c.zip |
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 <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/lib.sh')
-rw-r--r-- | contrib/cirrus/lib.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index e69f1e040..1b61fd5ec 100644 --- a/contrib/cirrus/lib.sh +++ b/contrib/cirrus/lib.sh @@ -35,8 +35,11 @@ req_env_var() { # and useful variables. # ref: https://cirrus-ci.org/guide/writing-tasks/#environment-variables show_env_vars() { + # This is almost always multi-line, print it separately + echo "export CIRRUS_CHANGE_MESSAGE=$CIRRUS_CHANGE_MESSAGE" echo " BUILDTAGS $BUILDTAGS +BUILT_IMAGE_SUFFIX $BUILT_IMAGE_SUFFIX CI $CI CIRRUS_CI $CIRRUS_CI CI_NODE_INDEX $CI_NODE_INDEX @@ -47,7 +50,6 @@ CIRRUS_BASE_SHA $CIRRUS_BASE_SHA CIRRUS_BRANCH $CIRRUS_BRANCH CIRRUS_BUILD_ID $CIRRUS_BUILD_ID CIRRUS_CHANGE_IN_REPO $CIRRUS_CHANGE_IN_REPO -CIRRUS_CHANGE_MESSAGE $CIRRUS_CHANGE_MESSAGE CIRRUS_CLONE_DEPTH $CIRRUS_CLONE_DEPTH CIRRUS_DEFAULT_BRANCH $CIRRUS_DEFAULT_BRANCH CIRRUS_PR $CIRRUS_PR @@ -66,6 +68,7 @@ CIRRUS_USER_PERMISSION $CIRRUS_USER_PERMISSION CIRRUS_WORKING_DIR $CIRRUS_WORKING_DIR CIRRUS_HTTP_CACHE_HOST $CIRRUS_HTTP_CACHE_HOST $(go env) +PACKER_BUILDS $PACKER_BUILDS " | while read NAME VALUE do [[ -z "$NAME" ]] || echo "export $NAME=\"$VALUE\"" |