diff options
author | Oliver Smith <osmith@sysmocom.de> | 2022-12-01 13:41:49 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2022-12-01 15:04:38 +0100 |
commit | ce5875fd077e3c9e3fa1dffd441ec334f3a9f58a (patch) | |
tree | c6c473a3e2c5b63d19313439883bba9d51e01d0d | |
parent | cc7af6cd5a5bf0d81508886e97834e106b54f281 (diff) |
jobs/osmo-gsm-tester virtual: fix docker img
Build the docker image right before using it, instead of building it in
another jenkins job update-osmo-ci-on-slaves via
osmo-ci-docker-rebuild.sh.
The logic in osmo-ci-docker-rebuild.sh was broken. I didn't realize at
the time that this image is only used for the virtual osmo-gsm-tester,
not the physical ones. But only the machines running the physical
osmo-gsm-tester have the /var/tmp/osmo-gsm-tester/state path. The
virtual osmo-gsm-tester isn't running on these machines but on generic
jenkins nodes.
Building the image right before using it makes sense for this job, as it
is the only user of the image. If it was already built from the same
Dockerfile, a cached version is used.
Fix for:
Unable to find image 'osmocom-build/osmo-gsm-tester:latest' locally
Fixes: 9139e76b ("osmo-ci-docker-rebuild: don't always build osmo-gsm-tester")
Change-Id: Icad9459de1d3a3a4e65ecacf7f903433bb504cc9
-rw-r--r-- | jobs/osmo-gsm-tester-runner.yml | 14 | ||||
-rwxr-xr-x | scripts/osmo-ci-docker-rebuild.sh | 5 |
2 files changed, 14 insertions, 5 deletions
diff --git a/jobs/osmo-gsm-tester-runner.yml b/jobs/osmo-gsm-tester-runner.yml index bff2a9b..814c0c9 100644 --- a/jobs/osmo-gsm-tester-runner.yml +++ b/jobs/osmo-gsm-tester-runner.yml @@ -224,6 +224,16 @@ - copy_artifact: repo: osmo-gsm-tester_build-osmocom-bb - shell: | + # Build the docker image + rm -rf docker-playground + git clone \ + --depth=1 \ + --branch="$DOCKER_PLAYGROUND_BRANCH" \ + https://gerrit.osmocom.org/docker-playground \ + docker-playground + git -C docker-playground log --oneline + make -C docker-playground/osmo-gsm-tester + unlink osmo-gsm-tester/sysmocom/resources.conf || true ln -s resources.conf.virtual osmo-gsm-tester/sysmocom/resources.conf @@ -260,3 +270,7 @@ name: "OSMO_GSM_TESTER_BRANCH" default: "master" description: "Which branch/sha should be used for testing" + - string: + name: "DOCKER_PLAYGROUND_BRANCH" + default: "master" + description: "Which branch/sha should be used for building the osmo-gsm-tester docker container" diff --git a/scripts/osmo-ci-docker-rebuild.sh b/scripts/osmo-ci-docker-rebuild.sh index 9c2aae6..f409d45 100755 --- a/scripts/osmo-ci-docker-rebuild.sh +++ b/scripts/osmo-ci-docker-rebuild.sh @@ -10,8 +10,3 @@ if [ "$(arch)" = "x86_64" ]; then "debian-bullseye-erlang" \ "debian-bullseye-jenkins" fi - -if [ -d "/var/tmp/osmo-gsm-tester/state" ]; then - docker_images_require \ - "osmo-gsm-tester" -fi |