File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -438,6 +438,13 @@ pipeline {
438438 environment name : ' EXIT_STATUS' , value : ' '
439439 }
440440 steps {
441+ sh ''' #! /bin/bash
442+ echo "Packages were updated. Cleaning up the image and exiting."
443+ if [ "${MULTIARCH}" == "true" ]; then
444+ docker rmi ${IMAGE}:amd64-${META_TAG}
445+ else
446+ docker rmi ${IMAGE}:${META_TAG}
447+ fi'''
441448 script{
442449 env. EXIT_STATUS = ' ABORTED'
443450 }
@@ -455,6 +462,13 @@ pipeline {
455462 }
456463 }
457464 steps {
465+ sh ''' #! /bin/bash
466+ echo "There are no package updates. Cleaning up the image and exiting."
467+ if [ "${MULTIARCH}" == "true" ]; then
468+ docker rmi ${IMAGE}:amd64-${META_TAG}
469+ else
470+ docker rmi ${IMAGE}:${META_TAG}
471+ fi'''
458472 script{
459473 env. EXIT_STATUS = ' ABORTED'
460474 }
@@ -544,7 +558,7 @@ pipeline {
544558 '''
545559 }
546560 sh ''' #! /bin/bash
547- for DELETEIMAGE in "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
561+ for DELETEIMAGE in "${GITHUBIMAGE}" "$ {GITLABIMAGE}" "${IMAGE}"; do
548562 docker rmi \
549563 ${DELETEIMAGE}:${META_TAG} \
550564 ${DELETEIMAGE}:${EXT_RELEASE_TAG} \
You can’t perform that action at this time.
0 commit comments