From ee97f5eaac9c10a280521c311e78bbfa407758c6 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Fri, 13 Nov 2020 16:17:09 -0500 Subject: [PATCH] Remove unnecessary branch var; allow skipping of tag/push step --- salt/common/tools/sbin/so-image-common | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/salt/common/tools/sbin/so-image-common b/salt/common/tools/sbin/so-image-common index f5d18ec2f..1a006f6fc 100755 --- a/salt/common/tools/sbin/so-image-common +++ b/salt/common/tools/sbin/so-image-common @@ -103,9 +103,7 @@ update_docker_containers() { SIGNPATH=/root/sosigs rm -rf $SIGNPATH mkdir -p $SIGNPATH - if [ -z "$BRANCH" ]; then - BRANCH="master" - fi + # Download the containers from the interwebs for i in "${TRUSTED_CONTAINERS[@]}" do @@ -131,9 +129,11 @@ update_docker_containers() { fi GPGTEST=$(gpg --verify $SIGNPATH/$i:$VERSION.sig $SIGNPATH/$i:$VERSION.txt 2>&1) if [[ $? -eq 0 ]]; then - # Tag it with the new registry destination - docker tag $CONTAINER_REGISTRY/$IMAGEREPO/$i:$VERSION $HOSTNAME:5000/$IMAGEREPO/$i:$VERSION - docker push $HOSTNAME:5000/$IMAGEREPO/$i:$VERSION + if [[ -z "$SKIP_TAGPUSH" ]]; then + # Tag it with the new registry destination + docker tag $CONTAINER_REGISTRY/$IMAGEREPO/$i:$VERSION $HOSTNAME:5000/$IMAGEREPO/$i:$VERSION + docker push $HOSTNAME:5000/$IMAGEREPO/$i:$VERSION + fi else echo "There is a problem downloading the $i:$VERSION image. Details: " echo ""