@@ -378,7 +378,9 @@ pipeline {
378378 // Build Docker container for push to LS Repo
379379 stage(' Build-Single' ) {
380380 when {
381- environment name : ' MULTIARCH' , value : ' false'
381+ expression {
382+ env. MULTIARCH == ' false' || params. PACKAGE_CHECK == ' true'
383+ }
382384 environment name : ' EXIT_STATUS' , value : ' '
383385 }
384386 steps {
@@ -403,7 +405,10 @@ pipeline {
403405 // Build MultiArch Docker containers for push to LS Repo
404406 stage(' Build-Multi' ) {
405407 when {
406- environment name : ' MULTIARCH' , value : ' true'
408+ allOf {
409+ environment name : ' MULTIARCH' , value : ' true'
410+ expression { params. PACKAGE_CHECK == ' false' }
411+ }
407412 environment name : ' EXIT_STATUS' , value : ' '
408413 }
409414 parallel {
@@ -508,7 +513,7 @@ pipeline {
508513 sh ''' #! /bin/bash
509514 set -e
510515 TEMPDIR=$(mktemp -d)
511- if [ "${MULTIARCH}" == "true" ]; then
516+ if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ] ; then
512517 LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
513518 else
514519 LOCAL_CONTAINER=${IMAGE}:${META_TAG}
@@ -569,7 +574,7 @@ pipeline {
569574 steps {
570575 sh ''' #! /bin/bash
571576 echo "Packages were updated. Cleaning up the image and exiting."
572- if [ "${MULTIARCH}" == "true" ]; then
577+ if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ] ; then
573578 docker rmi ${IMAGE}:amd64-${META_TAG}
574579 else
575580 docker rmi ${IMAGE}:${META_TAG}
@@ -593,7 +598,7 @@ pipeline {
593598 steps {
594599 sh ''' #! /bin/bash
595600 echo "There are no package updates. Cleaning up the image and exiting."
596- if [ "${MULTIARCH}" == "true" ]; then
601+ if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ] ; then
597602 docker rmi ${IMAGE}:amd64-${META_TAG}
598603 else
599604 docker rmi ${IMAGE}:${META_TAG}
0 commit comments