diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-07-26 14:55:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-26 14:55:12 +0200 |
commit | b212daa92f3a596efa87b6ccaa097f70cd34bb10 (patch) | |
tree | 11d945f47836e9aef2f83e2c461ff4da191b081c /contrib/cirrus/build_vm_images.sh | |
parent | eca157fb54d860215695b8e1de8a10cd1c836772 (diff) | |
parent | ac5ad9acbf93106b39505803d9ed230c8c87fea9 (diff) | |
download | podman-b212daa92f3a596efa87b6ccaa097f70cd34bb10.tar.gz podman-b212daa92f3a596efa87b6ccaa097f70cd34bb10.tar.bz2 podman-b212daa92f3a596efa87b6ccaa097f70cd34bb10.zip |
Merge pull request #3632 from cevich/small_cirrus_fixes
Small cirrus and image-build fixes
Diffstat (limited to 'contrib/cirrus/build_vm_images.sh')
-rwxr-xr-x | contrib/cirrus/build_vm_images.sh | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/contrib/cirrus/build_vm_images.sh b/contrib/cirrus/build_vm_images.sh index 74b10158c..dd5182c37 100755 --- a/contrib/cirrus/build_vm_images.sh +++ b/contrib/cirrus/build_vm_images.sh @@ -32,7 +32,7 @@ for base_image_var in $BASE_IMAGE_VARS do # See entrypoint.sh in contrib/imgts and contrib/imgprune # These updates can take a while, run them in the background, check later - gcloud compute images update "$image" \ + gcloud compute images update \ --update-labels=last-used=$(date +%s) \ --update-labels=build-id=$CIRRUS_BUILD_ID \ --update-labels=repo-ref=$CIRRUS_CHANGE_IN_REPO \ @@ -62,17 +62,6 @@ URI="gs://packer-import${POST_MERGE_BUCKET_SUFFIX}/manifest${BUILT_IMAGE_SUFFIX} gsutil cp packer-manifest.json "$URI" # Ensure any background 'gcloud compute images update' processes finish -set +e # need 'wait' exit code to avoid race -while [[ -n "$(jobs)" ]] -do - wait -n - RET=$? - if [[ "$RET" -eq "127" ]] || \ # Avoid TOCTOU race w/ jobs + wait - [[ "$RET" -eq "0" ]] - then - continue - fi - die $RET "Required base-image metadata update failed" -done +wait # CentOS has no -n option :( echo "Finished. A JSON manifest of produced images is available at $URI" |