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

fixeria gerrit-no-reply at lists.osmocom.org
Tue Jun 29 18:44:45 UTC 2021


fixeria has submitted this change. ( 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(-)

Approvals:
  fixeria: Looks good to me, approved; Verified



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-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210629/14ba93b7/attachment.htm>


More information about the gerrit-log mailing list