aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-04-29 15:58:37 +0200
committerOliver Smith <osmith@sysmocom.de>2021-05-04 12:20:05 +0200
commitcdcce039663d41c93593e1aa76dc9e1a67359110 (patch)
treef11f718ec2e5fb80f1daf0dcfb15e26de14d8eb1
parent8e95373986f8991b509d85515305b50dd7bd026a (diff)
jenkins-common.sh: support 2021q1 feedosmith/obs-2021q1
Adjust docker_depends and docker_dir_from_image_name for 2021q1. Extend README.md with examples. Related: SYS#5370 Change-Id: Icf1e3f1928658ff3d82190c4176252cf3590a1f5
-rw-r--r--README.md30
-rw-r--r--jenkins-common.sh25
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
}