9595 exit 0
9696 fi
9797
98+ RELEASE_ACCEPTANCE_TEST=$(get_env release-acceptance-test)
99+ RELEASE_ACCEPTANCE_TEST="$(echo "$RELEASE_ACCEPTANCE_TEST" | tr '[:upper:]' '[:lower:]')"
100+
101+ if [[ ! -z "$RELEASE_ACCEPTANCE_TEST" && "$RELEASE_ACCEPTANCE_TEST" != "false" && "$RELEASE_ACCEPTANCE_TEST" != "no" ]]; then
102+ echo "Skipping unit-tests. This run is for a release acceptance test only."
103+ exit 0
104+ fi
105+
98106 ## Setup required tooling
99107 make setup-go GO_RELEASE_VERSION=$(get_env go-version)
100108 export PATH=$PATH:/usr/local/go/bin
@@ -126,6 +134,14 @@ static-scan:
126134 echo "Skipping static-scan. This is a test run only"
127135 exit 0
128136 fi
137+
138+ RELEASE_ACCEPTANCE_TEST=$(get_env release-acceptance-test)
139+ RELEASE_ACCEPTANCE_TEST="$(echo "$RELEASE_ACCEPTANCE_TEST" | tr '[:upper:]' '[:lower:]')"
140+
141+ if [[ ! -z "$RELEASE_ACCEPTANCE_TEST" && "$RELEASE_ACCEPTANCE_TEST" != "false" && "$RELEASE_ACCEPTANCE_TEST" != "no" ]]; then
142+ echo "Skipping static-scan. This run is for a release acceptance test only."
143+ exit 0
144+ fi
129145
130146 BRANCH=$(get_env branch)
131147 read -r SONAR_HOST_URL <<< "$(get_env sonarqube | jq -r '.parameters.dashboard_url' | sed 's:/*$::')"
@@ -210,6 +226,8 @@ containerize:
210226
211227 PERIODIC_SCAN=$(get_env periodic-rescan)
212228 PERIODIC_SCAN="$(echo "$PERIODIC_SCAN" | tr '[:upper:]' '[:lower:]')"
229+ RELEASE_ACCEPTANCE_TEST=$(get_env release-acceptance-test)
230+ RELEASE_ACCEPTANCE_TEST="$(echo "$RELEASE_ACCEPTANCE_TEST" | tr '[:upper:]' '[:lower:]')"
213231 # Build images
214232 export PIPELINE_USERNAME=$(get_env ibmcloud-api-user)
215233 export PIPELINE_PASSWORD=$(get_env ibmcloud-api-key-staging)
@@ -234,8 +252,19 @@ containerize:
234252 echo "skopeo version"
235253 skopeo --version || exit 1
236254
255+ BUILD_RELEASE_TARGET_FROM_KNOWN_IMAGES="false"
237256 if [[ ! -z "$PERIODIC_SCAN" && "$PERIODIC_SCAN" != "false" && "$PERIODIC_SCAN" != "no" ]]; then
238- echo "Skipping containerize, but generating list of images. This is a periodic run that is only meant to produce CVE information."
257+ echo "This is a periodic run that is only meant to produce CVE information."
258+ BUILD_RELEASE_TARGET_FROM_KNOWN_IMAGES="true"
259+ fi
260+
261+ if [[ ! -z "$RELEASE_ACCEPTANCE_TEST" && "$RELEASE_ACCEPTANCE_TEST" != "false" && "$RELEASE_ACCEPTANCE_TEST" != "no" ]]; then
262+ echo "This run is for a release acceptance test only."
263+ BUILD_RELEASE_TARGET_FROM_KNOWN_IMAGES="true"
264+ fi
265+
266+ if [[ "$BUILD_RELEASE_TARGET_FROM_KNOWN_IMAGES" == "true" ]]; then
267+ echo "Skipping containerize, but generating list of images."
239268 RELEASE_TARGET=$(curl --silent "https://api.github.com/repos/WASdev/websphere-liberty-operator/releases/latest" | jq -r .tag_name)
240269 #RELEASE_TARGET=$(get_env branch)
241270 else
@@ -428,6 +457,16 @@ sign-artifact:
428457 exit 0
429458 fi
430459
460+ RELEASE_ACCEPTANCE_TEST=$(get_env release-acceptance-test)
461+ RELEASE_ACCEPTANCE_TEST="$(echo "$RELEASE_ACCEPTANCE_TEST" | tr '[:upper:]' '[:lower:]')"
462+
463+ if [[ ! -z "$RELEASE_ACCEPTANCE_TEST" && "$RELEASE_ACCEPTANCE_TEST" != "false" && "$RELEASE_ACCEPTANCE_TEST" != "no" ]]; then
464+ echo "Skipping sign-artifact. This run is for a release acceptance test only."
465+ exit 0
466+ fi
467+
468+
469+
431470deploy :
432471 image : icr.io/continuous-delivery/pipeline/pipeline-base-ubi:3.12
433472 script : |
@@ -472,6 +511,14 @@ dynamic-scan:
472511 echo "Skipping static-scan. This is a test run only"
473512 exit 0
474513 fi
514+
515+ RELEASE_ACCEPTANCE_TEST=$(get_env release-acceptance-test)
516+ RELEASE_ACCEPTANCE_TEST="$(echo "$RELEASE_ACCEPTANCE_TEST" | tr '[:upper:]' '[:lower:]')"
517+
518+ if [[ ! -z "$RELEASE_ACCEPTANCE_TEST" && "$RELEASE_ACCEPTANCE_TEST" != "false" && "$RELEASE_ACCEPTANCE_TEST" != "no" ]]; then
519+ echo "Skipping dynamic-scan. This run is for a release acceptance test only."
520+ exit 0
521+ fi
475522
476523 #export APP_URL=$(cat ../app-url)
477524 # feature preview this until evidence locker v2 usage is full feature ready
@@ -536,6 +583,14 @@ scan-artifact:
536583 echo "Skipping static-scan. This is a test run only"
537584 exit 0
538585 fi
586+
587+ RELEASE_ACCEPTANCE_TEST=$(get_env release-acceptance-test)
588+ RELEASE_ACCEPTANCE_TEST="$(echo "$RELEASE_ACCEPTANCE_TEST" | tr '[:upper:]' '[:lower:]')"
589+
590+ if [[ ! -z "$RELEASE_ACCEPTANCE_TEST" && "$RELEASE_ACCEPTANCE_TEST" != "false" && "$RELEASE_ACCEPTANCE_TEST" != "no" ]]; then
591+ echo "Skipping scan-artifact. This run is for a release acceptance test only."
592+ exit 0
593+ fi
539594
540595 # ========== Security Scanner ==========
541596 ./scripts/pipeline/ci_to_secure_pipeline_scan.sh
@@ -564,6 +619,14 @@ release:
564619 exit 0
565620 fi
566621
622+ RELEASE_ACCEPTANCE_TEST=$(get_env release-acceptance-test)
623+ RELEASE_ACCEPTANCE_TEST="$(echo "$RELEASE_ACCEPTANCE_TEST" | tr '[:upper:]' '[:lower:]')"
624+
625+ if [[ ! -z "$RELEASE_ACCEPTANCE_TEST" && "$RELEASE_ACCEPTANCE_TEST" != "false" && "$RELEASE_ACCEPTANCE_TEST" != "no" ]]; then
626+ echo "Skipping release. This run is for a release acceptance test only."
627+ exit 0
628+ fi
629+
567630 RELEASE_FLAG=$(get_env release "false")
568631
569632 if [[ $RELEASE_FLAG != "true" ]]; then
0 commit comments