From cdcce039663d41c93593e1aa76dc9e1a67359110 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 29 Apr 2021 15:58:37 +0200 Subject: jenkins-common.sh: support 2021q1 feed Adjust docker_depends and docker_dir_from_image_name for 2021q1. Extend README.md with examples. Related: SYS#5370 Change-Id: Icf1e3f1928658ff3d82190c4176252cf3590a1f5 --- README.md | 30 +++++++++++++++++++++++++++++- jenkins-common.sh | 25 +++++++++++++++++++++++-- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 490e2a8..9a1889e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ test automation. ## Running a testsuite All testsuite folders start with `ttcn3` or `nplab`. Run the following -to build/update all required containers and start a specific testsuite: +to build/update all required containers from the "master" branch and +start a specific testsuite: ``` $ cd ttcn3-mgw-test @@ -26,6 +27,33 @@ Environment variables: * `NO_DOCKER_IMAGE_BUILD`: when set to `1`, it won't try to update the containers (see "caching" below) +### More examples + +latest (debian): +``` +$ export IMAGE_SUFFIX="latest" +$ cd ttcn3-mgw-test +$ ./jenkins.sh +``` + +latest-centos8: +``` +$ export IMAGE_SUFFIX="latest-centos8" +$ cd ttcn3-mgw-test +$ ./jenkins.sh +``` + +2021q1-centos8: +``` +export OSMOCOM_REPO_TESTSUITE_MIRROR="http://download.opensuse.org" +export OSMOCOM_REPO_MIRROR="https://downloads.osmocom.org" +export OSMOCOM_REPO_PATH="osmo-maintained" +export OSMOCOM_REPO_VERSION="2021q1" +export IMAGE_SUFFIX="2021q1-centos8" +$ cd ttcn3-mgw-test +$ ./jenkins.sh +``` + ## Kernel test OsmoGGSN can be configured to either run completely in userspace, or to use the GTP-U kernel module. To test the kernel module, OsmoGGSN and diff --git a/jenkins-common.sh b/jenkins-common.sh index 67a467d..e6a432d 100644 --- a/jenkins-common.sh +++ b/jenkins-common.sh @@ -6,7 +6,15 @@ docker_image_exists() { } docker_depends() { + local feed + case "$1" in + osmo-*-20*q*-centos8) + # e.g. osmo-mgw-2021q1-centos8 -> centos8-obs-2021q1 + feed="$(echo "$1" | grep -o -P -- "20\d\dq.*$")" # e.g. "2021q1-centos8" + feed="$(echo "$feed" | sed 's/\-centos8$//')" # e.g. "2021q1" + echo "centos8-obs-$feed" + ;; osmo-*-latest-centos8) echo "centos8-obs-latest" ;; osmo-*-centos8) echo "centos8-build" ;; osmo-*-latest) echo "debian-stretch-obs-latest" ;; @@ -34,8 +42,21 @@ docker_upstream_distro_from_image_name() { docker_dir_from_image_name() { case "$1" in - osmo-*-centos8) echo "$1" | sed 's/\-centos8$//' ;; - *) echo "$1" ;; + osmo-*-20*q*-centos8) + # e.g. osmo-mgw-2021q1-centos8 -> osmo-mgw-latest + echo "$1" | sed 's/20[0-9][0-9]q.*\-centos8$/latest/' + ;; + osmo-*-centos8) + # e.g. osmo-mgw-latest-centos8 -> osmo-mgw-latest + echo "$1" | sed 's/\-centos8$//' + ;; + centos8-obs-20*q*) + # e.g. centos8-obs-2021q1 -> centos8-obs-latest + echo "$1" | sed 's/20[0-9][0-9]q.*$/latest/' + ;; + *) + echo "$1" + ;; esac } -- cgit v1.2.3