MT#60865 tap-tests-docker: provide jenkins-tap-test-trixie docker container

TL;DR: Even though we introduced support for Debian/trixie in 2024, we
didn't switch to the provided trixie docker container so far *yet*, but
had to provide an initial jenkins-tap-test-trixie docker container
underneath anyways. Now that this has been reworked, we can finally
really integrate the jenkins-tap-test-trixie environment.

The longer story behind this change:

We added Debian/trixie support in 2024 to our build environments and
Jenkins(-configs).  When triggering ngcpcfg-get-code against bookworm,
it reported one failed test, due to:

| # cat reports/source/docs/hacking.txt_mergecheck.tap
| 1..1
| not ok 1           =======

This was already reported and fixed as MT#60909, but it didn't fail the
build (but marks it unstable). Whereas the ngcpcfg-tap-test run against
*trixie* failed hard for us, reporting 9 shellcheck issues.

For mr* release until and including mr9.4* we only ran the legacy
jenkins-tap-test-jessie docker container, invoking:

  tap_tool_dispatcher

For newer mr* releases as well as trunk/master builds, we also ran
the jenkins-tap-test-jessie container, but then executed it with:

  tap_tool_dispatcher --disable-checkbashism --disable-pep8 --disable-perlcritic

Only if this returns with exit code 0, we also proceeded to execute (also
see jenkins-configs git commit 835e4a8):

  tap_tool_dispatcher --disable-shellcheck

But we did *not* run the later command against the
jenkins-tap-test-jessie container, but the actual
"jenkins-tap-test-$distribution". So for example we use
jenkins-tap-test-bookworm when building against bookworm, or
jenkins-tap-test-trixie when building against trixie.

This was meant to preserve some backwards compatibility, to e.g. not
break existing builds with new checks introduced by newer shellcheck
versions.

So far we didn't have such a jenkins-tap-test-trixie docker container,
therefore ngcpcfg-tap-test failed to run the second docker container.
But the results from the *initial* tap_tool_dispatcher execution of
jenkins-tap-test-jessie environment are left behind and reported,
resulting in the 9 shellcheck issues we saw.

Now as of MT#61842 with jenkins-configs git commits
d31c00a975083eb586d7921503a7d7391bc7606b +
986c60fe04bb53b88b7fb854d31b46ea01517ba9 +
650aecd78888aa63ee9e57ab31221cc166fcac4c we switched from
jenkins-tap-test-jessie container to
jenkins-tap-test-$distribution:$ngcp_release usage. For NGCP releases up
to and incl. mr9.4* we continue to rely on the legacy
jenkins-tap-test-jessie approach. For releases mr9.5* up to and incl.
mr13.3*, we use the old approach (as mentioned above) with
jenkins-tap-test-jessie *and*
jenkins-tap-test-$distribution:$ngcp_release. Finally, for master +
releases >mr13.3 we skip those legacy workarounds.

Change-Id: Ie8de99ef518b53a28767122fa5596f5528c75493
mr13.4.1
Michael Prokop 9 months ago
parent da12b9a234
commit e4637c6090

@ -1,15 +1,15 @@
# DOCKER_NAME=jenkins-tap-test-bookworm
FROM docker.mgm.sipwise.com/sipwise-bookworm:latest
# DOCKER_NAME=jenkins-tap-test-trixie
FROM docker.mgm.sipwise.com/sipwise-trixie:latest
# Important! Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
ENV REFRESHED_AT 2025-04-01
ENV REFRESHED_AT 2025-05-06
# we want to use jenkins-debian-glue from our own internal
# repository and not from Debian
RUN echo 'deb https://deb.sipwise.com/autobuild internal-bookworm main' > /etc/apt/sources.list.d/internal.list
RUN echo 'deb https://deb.sipwise.com/autobuild internal-trixie main' > /etc/apt/sources.list.d/internal.list
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
binutils \
@ -47,12 +47,12 @@ WORKDIR /code/
# (jump to the next section if you don't want to build yourself!):
# NOTE: run the following command from root folder of git repository:
#
# % docker build --tag="jenkins-tap-test-bookworm" -f t/tap-tests-docker/Dockerfile .
# % docker run --rm -i -t -v $(pwd):/code/source:rw jenkins-tap-test-bookworm:latest bash
# % docker build --tag="jenkins-tap-test-trixie" -f t/tap-tests-docker/Dockerfile .
# % docker run --rm -i -t -v $(pwd):/code/source:rw jenkins-tap-test-trixie:latest bash
#
# Use the existing docker image:
# % docker pull docker.mgm.sipwise.com/jenkins-tap-test-bookworm
# % docker run --rm -i -t -v $(pwd):/code/source:rw docker.mgm.sipwise.com/jenkins-tap-test-bookworm:latest bash
# % docker pull docker.mgm.sipwise.com/jenkins-tap-test-trixie
# % docker run --rm -i -t -v $(pwd):/code/source:rw docker.mgm.sipwise.com/jenkins-tap-test-trixie:latest bash
#
# Inside docker (the command is in history, just press UP button):
# LC_ALL=C.UTF-8 SHELL=bash WORKSPACE=/code/ /usr/bin/tap_tool_dispatcher

Loading…
Cancel
Save