Change in docker-playground[master]: jenkins-common.sh: add image_suffix_is_master()

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Tue Jun 29 11:20:43 UTC 2021


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


Change subject: jenkins-common.sh: add image_suffix_is_master()
......................................................................

jenkins-common.sh: add image_suffix_is_master()

Since recently, we also have a new IMAGE_SUFFIX '2021q1-centos8'.
We cannot rely on image_suffix_is_latest() anymore, because this
prefix does not qualify as 'latest'.  If one needs to enable a
feature that is only available in master, then here is a way:

  if ! image_suffix_is_master; then
      # Patch the configuration files
  fi

Change-Id: I65df66cd2e14934bed8114618d6ffad7831d1025
---
M jenkins-common.sh
1 file changed, 8 insertions(+), 0 deletions(-)



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

diff --git a/jenkins-common.sh b/jenkins-common.sh
index 36f7e9c..2cf5c50 100644
--- a/jenkins-common.sh
+++ b/jenkins-common.sh
@@ -343,6 +343,14 @@
 	esac
 }
 
+# Check if IMAGE_SUFFIX starts with "master" (e.g. "master-centos8")
+image_suffix_is_master() {
+	case "$IMAGE_SUFFIX" in
+	master*) return 0 ;;
+	*) return 1 ;;
+	esac
+}
+
 set -x
 
 # non-jenkins execution: assume local user name

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I65df66cd2e14934bed8114618d6ffad7831d1025
Gerrit-Change-Number: 24791
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210629/3874e729/attachment.htm>


More information about the gerrit-log mailing list