gitlab-ci: print environment variables not part of run-test.sh script

The output of our test scripts is captured by gitlab. It does however
sanitize things that look like secrets. So it was reasonably save
to call `env` from within the test script.

Next, we will redirect (`tee`) the output of the test script to a
file and archive it. When we do that, the output does not get sanitized
and can be downloaded from the artifacts page.

Stop running `env` as part of the test script. Do it instead as a
separate step. After all, it is useful to see the environment variables
of the test. But sanitized.
This commit is contained in:
Thomas Haller 2022-03-17 21:25:44 +01:00
parent d719bab9f7
commit bbd053bf83
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
3 changed files with 7 additions and 6 deletions

View file

@ -47,11 +47,11 @@ variables:
#
# This is done by running `ci-fairy generate-template` and possibly bump
# ".default_tag".
FEDORA_TAG: '2022-03-15.0-1c8fb45999e9'
UBUNTU_TAG: '2022-03-15.0-f7d56c5dcd47'
DEBIAN_TAG: '2022-03-15.0-f7d56c5dcd47'
CENTOS_TAG: '2022-03-15.0-1c8fb45999e9'
ALPINE_TAG: '2022-03-15.0-91803105505b'
FEDORA_TAG: '2022-03-15.0-fb4fc6b5dff6'
UBUNTU_TAG: '2022-03-15.0-6b7641ec0d2b'
DEBIAN_TAG: '2022-03-15.0-6b7641ec0d2b'
CENTOS_TAG: '2022-03-15.0-fb4fc6b5dff6'
ALPINE_TAG: '2022-03-15.0-f6b3036d4e95'
FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh'
UBUNTU_EXEC: 'bash .gitlab-ci/debian-install.sh'
@ -622,6 +622,7 @@ alpine:latest@container-clean:
.build@template:
stage: test
script:
- env
- .gitlab-ci/run-test.sh
dependencies: []

View file

@ -144,6 +144,7 @@ variables:
.build@template:
stage: test
script:
- env
- .gitlab-ci/run-test.sh
dependencies: []

View file

@ -15,7 +15,6 @@ do_clean() {
uname -a
! command -v locale &>/dev/null || locale -a
env
meson --version
! command -v dpkg &>/dev/null || dpkg -l