ttcn3-bts-test: fix config merge caching problem

Do "docker run" directly inside the Makefile, without wrapping it
through the "run" target in make/Makefile. Use $(USER)/ttcn3-bts-test as
image name, instead of $(REGISTRY)/$(USER)/ttcn3-bts-test. The
$(REGISTRY)/ part is hardcoded in make/Makefile.

This fixes TTCN3-centos-bts-test, because it uses the ttcn3-bts-test
image that gets built in jenkins.sh before running 'make cfg'. Without
the patch, an image downloaded some time ago from the registry gets
used (a new image is not pulled), leading to the stale config.

Fixes: OS#6065
Change-Id: Iebd81e814d84e8cf8360568419ceda7ffc38e742
This commit is contained in:
Oliver Smith 2023-06-20 14:15:58 +02:00
parent 7c0bb4e341
commit 5227834974
1 changed files with 6 additions and 3 deletions

View File

@ -18,9 +18,12 @@ cfg: $(CFG_SRC_FILES) $(CFG_GEN_FILES)
# Ensure that we always fetch up-to-date configuration files.
# See https://www.gnu.org/software/make/manual/make.html#Force-Targets
%src.cfg: FORCE_FETCH
$(MAKE) run \
RUN_ARGS="-v $(CURDIR):/data --user $(UID)" \
RUN_CMD="cp /osmo-ttcn3-hacks/bts/$(@:%.src.cfg=%.cfg) /data/$@"
docker run \
--rm \
--user $(UID) \
-v $(CURDIR):/data \
$(USER)/ttcn3-bts-test \
cp /osmo-ttcn3-hacks/bts/$(@:%.src.cfg=%.cfg) /data/$@
FORCE_FETCH:
generic/osmo-bts.gen.cfg: osmo-bts.src.cfg generic/osmo-bts.confmerge