From e9e9ed5f59c4d63c931dbef0329a7e075c8f7dc0 Mon Sep 17 00:00:00 2001 From: john30 Date: Sun, 17 Jan 2021 17:41:49 +0100 Subject: [PATCH] fix image name in manifest, allow silent fail if not all images are available --- contrib/docker/hooks/post_push | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/docker/hooks/post_push b/contrib/docker/hooks/post_push index 0f026f93..1d1dffd3 100755 --- a/contrib/docker/hooks/post_push +++ b/contrib/docker/hooks/post_push @@ -1,5 +1,10 @@ #!/bin/bash curl -sLo manifest-tool "https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64" chmod +x manifest-tool -sed -e "s#%image_name%#$IMAGE_NAME#" manifest.template > manifest.yaml +sed -e "s#%image_name%#${IMAGE_NAME%%-*}#" manifest.template > manifest.yaml +set +e ./manifest-tool push from-spec manifest.yaml +if [ $? -ne 0 ]; then + echo "manifest failed, post_push step ignored" + exit 0 +fi