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
This commit is contained in:
Oliver Smith 2021-04-29 15:58:37 +02:00
parent 8e95373986
commit cdcce03966
2 changed files with 52 additions and 3 deletions

View File

@ -7,7 +7,8 @@ test automation.
## Running a testsuite ## Running a testsuite
All testsuite folders start with `ttcn3` or `nplab`. Run the following 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 $ 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 * `NO_DOCKER_IMAGE_BUILD`: when set to `1`, it won't try to update the
containers (see "caching" below) 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 ## Kernel test
OsmoGGSN can be configured to either run completely in userspace, or to 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 use the GTP-U kernel module. To test the kernel module, OsmoGGSN and

View File

@ -6,7 +6,15 @@ docker_image_exists() {
} }
docker_depends() { docker_depends() {
local feed
case "$1" in 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-*-latest-centos8) echo "centos8-obs-latest" ;;
osmo-*-centos8) echo "centos8-build" ;; osmo-*-centos8) echo "centos8-build" ;;
osmo-*-latest) echo "debian-stretch-obs-latest" ;; osmo-*-latest) echo "debian-stretch-obs-latest" ;;
@ -34,8 +42,21 @@ docker_upstream_distro_from_image_name() {
docker_dir_from_image_name() { docker_dir_from_image_name() {
case "$1" in case "$1" in
osmo-*-centos8) echo "$1" | sed 's/\-centos8$//' ;; osmo-*-20*q*-centos8)
*) echo "$1" ;; # 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 esac
} }