@@ -379,7 +379,9 @@ pipeline {
379379 // Build Docker container for push to LS Repo
380380 stage(' Build-Single' ) {
381381 when {
382- environment name : ' MULTIARCH' , value : ' false'
382+ expression {
383+ env. MULTIARCH == ' false' || params. PACKAGE_CHECK == ' true'
384+ }
383385 environment name : ' EXIT_STATUS' , value : ' '
384386 }
385387 steps {
@@ -404,7 +406,10 @@ pipeline {
404406 // Build MultiArch Docker containers for push to LS Repo
405407 stage(' Build-Multi' ) {
406408 when {
407- environment name : ' MULTIARCH' , value : ' true'
409+ allOf {
410+ environment name : ' MULTIARCH' , value : ' true'
411+ expression { params. PACKAGE_CHECK == ' false' }
412+ }
408413 environment name : ' EXIT_STATUS' , value : ' '
409414 }
410415 parallel {
@@ -509,7 +514,7 @@ pipeline {
509514 sh ''' #! /bin/bash
510515 set -e
511516 TEMPDIR=$(mktemp -d)
512- if [ "${MULTIARCH}" == "true" ]; then
517+ if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ] ; then
513518 LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
514519 else
515520 LOCAL_CONTAINER=${IMAGE}:${META_TAG}
@@ -570,7 +575,7 @@ pipeline {
570575 steps {
571576 sh ''' #! /bin/bash
572577 echo "Packages were updated. Cleaning up the image and exiting."
573- if [ "${MULTIARCH}" == "true" ]; then
578+ if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ] ; then
574579 docker rmi ${IMAGE}:amd64-${META_TAG}
575580 else
576581 docker rmi ${IMAGE}:${META_TAG}
@@ -594,7 +599,7 @@ pipeline {
594599 steps {
595600 sh ''' #! /bin/bash
596601 echo "There are no package updates. Cleaning up the image and exiting."
597- if [ "${MULTIARCH}" == "true" ]; then
602+ if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ] ; then
598603 docker rmi ${IMAGE}:amd64-${META_TAG}
599604 else
600605 docker rmi ${IMAGE}:${META_TAG}
0 commit comments