diff mbox series

[isar-cip-core,3/5] reproducible-check: Add option to pass extensions of the image

Message ID 20230911133147.3164-4-venkata.pyla@toshiba-tsip.com (mailing list archive)
State Accepted
Headers show
Series Add security and BBB targets in | expand

Commit Message

Venkata Pyla Sept. 11, 2023, 1:31 p.m. UTC
From: venkata pyla <venkata.pyla@toshiba-tsip.com>

Images build with extentions like `security` have different name than
base image, so prepare filename based on the extension passed to the
script.

Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com>
---
 .reproducible-check-ci.yml | 3 ++-
 scripts/repro-tests.sh     | 9 +++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/.reproducible-check-ci.yml b/.reproducible-check-ci.yml
index 35acb01..dec28e2 100644
--- a/.reproducible-check-ci.yml
+++ b/.reproducible-check-ci.yml
@@ -55,10 +55,11 @@ 
   variables:
     GIT_STRATEGY: none
     release: bookworm
+    extension: security
   before_script:
     - apt update && DEBIAN_FRONTEND=noninteractive apt install -y diffoscope
   script:
-    - ./scripts/repro-tests.sh --release ${release} --target ${target} image1 image2
+    - ./scripts/repro-tests.sh --release ${release} --target ${target} --extension ${extension} image1 image2
   artifacts:
     when: always
     expire_in: 1 day
diff --git a/scripts/repro-tests.sh b/scripts/repro-tests.sh
index ab3dbce..2143058 100755
--- a/scripts/repro-tests.sh
+++ b/scripts/repro-tests.sh
@@ -31,6 +31,7 @@  GREEN='\033[0;32m'
 IMAGE_BASE="cip-core-image-cip-core"
 RELEASE="bullseye"
 TARGET="qemu-amd64"
+EXTENSION=""
 DIFFOSCOPE="diffoscope"
 
 while [ "$1" != "" ]; do
@@ -43,6 +44,10 @@  while [ "$1" != "" ]; do
 			TARGET="$2"
 			shift 2
 			;;
+		-e | --extension )
+			EXTENSION="$2"
+			shift 2
+			;;
 		-h | --help )
 			usage
 			exit
@@ -63,6 +68,10 @@  if [ -z "$artifacts1" ] || [ -z "$artifacts2" ]; then
 	exit 1
 fi
 
+if [ "${EXTENSION}" = "security" ]; then
+	IMAGE_BASE="cip-core-image-security-cip-core"
+fi
+
 # Define files in the artifacts for checking the reproducibility
 set -- \
 	"${IMAGE_BASE}-${RELEASE}-${TARGET}.wic.p1" \