Change in docker-playground[master]: jenkins-common.sh: add image_suffix_is_latest

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Thu May 20 12:35:49 UTC 2021


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/24317 )


Change subject: jenkins-common.sh: add image_suffix_is_latest
......................................................................

jenkins-common.sh: add image_suffix_is_latest

Make sure we run the latest-code paths for "latest-centos8" too.

Change-Id: Ibcc7dfb092b3766ef9b189ae990b43fdb746a022
---
M jenkins-common.sh
M ttcn3-pcu-test/jenkins.sh
M ttcn3-sgsn-test/jenkins.sh
M ttcn3-stp-test/jenkins.sh
4 files changed, 11 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/17/24317/1

diff --git a/jenkins-common.sh b/jenkins-common.sh
index e6a432d..36f7e9c 100644
--- a/jenkins-common.sh
+++ b/jenkins-common.sh
@@ -335,6 +335,14 @@
 	exit 1
 }
 
+# Check if IMAGE_SUFFIX starts with "latest" (e.g. "latest-centos8")
+image_suffix_is_latest() {
+	case "$IMAGE_SUFFIX" in
+	latest*) return 0 ;;
+	*) return 1 ;;
+	esac
+}
+
 set -x
 
 # non-jenkins execution: assume local user name
diff --git a/ttcn3-pcu-test/jenkins.sh b/ttcn3-pcu-test/jenkins.sh
index c597e0e..606f1f5 100755
--- a/ttcn3-pcu-test/jenkins.sh
+++ b/ttcn3-pcu-test/jenkins.sh
@@ -17,7 +17,7 @@
 cp PCU_Tests.cfg $VOL_BASE_DIR/pcu-tester/
 
 # Disable until osmo-pcu release > 0.9.0
-if [ "$IMAGE_SUFFIX" = "latest" ]; then
+if image_suffix_is_latest; then
 	sed -i "s/^PCUIF_Components.mp_send_all_data_ind.*/PCUIF_Components.mp_send_all_data_ind := false;/" $VOL_BASE_DIR/pcu-tester/PCU_Tests.cfg
 fi
 
diff --git a/ttcn3-sgsn-test/jenkins.sh b/ttcn3-sgsn-test/jenkins.sh
index 654a882..05f7945 100755
--- a/ttcn3-sgsn-test/jenkins.sh
+++ b/ttcn3-sgsn-test/jenkins.sh
@@ -25,7 +25,7 @@
 mkdir $VOL_BASE_DIR/unix
 
 # Disable until osmo-sgsn.git release > 1.7.0 is available
-if [ "$IMAGE_SUFFIX" = "latest" ]; then
+if image_suffix_is_latest; then
 	sed "/mme test-mme0/d" -i $VOL_BASE_DIR/stp/osmo-stp.cfg
 	sed "/gtp remote-ip/d" -i $VOL_BASE_DIR/sgsn/osmo-sgsn.cfg
 	sed "/gtp ran-info-relay/d" -i $VOL_BASE_DIR/sgsn/osmo-sgsn.cfg
diff --git a/ttcn3-stp-test/jenkins.sh b/ttcn3-stp-test/jenkins.sh
index 9d8dc8c..cecd07c 100755
--- a/ttcn3-stp-test/jenkins.sh
+++ b/ttcn3-stp-test/jenkins.sh
@@ -16,7 +16,7 @@
 cp osmo-stp.cfg $VOL_BASE_DIR/stp/
 
 # Disable until osmo-stp release > 1.4.0
-if [ "$IMAGE_SUFFIX" = "latest" ]; then
+if image_suffix_is_latest; then
 	sed -i "s/^STP_Tests_M3UA.mp_stp_has_asp_quirk.*/STP_Tests_M3UA.mp_stp_has_asp_quirk := false;/" $VOL_BASE_DIR/stp-tester/STP_Tests.cfg
 fi
 

-- 
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/24317
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ibcc7dfb092b3766ef9b189ae990b43fdb746a022
Gerrit-Change-Number: 24317
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210520/d26a550b/attachment.htm>


More information about the gerrit-log mailing list