test: move env variables into set-env-variables helper

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2021-07-09 12:01:29 +02:00 committed by Ondřej Budai
parent f3a58d699a
commit 4c5d1ae45a
18 changed files with 24 additions and 30 deletions

View file

@ -51,8 +51,7 @@ EOF
}
# Get OS details.
source /etc/os-release
ARCH=$(uname -m)
source tools/set-env-variables.sh
if [[ $ID == "rhel" && ${VERSION_ID%.*} == "9" ]]; then
# There's a bug in RHEL 9 that causes /tmp to be mounted on tmpfs.

View file

@ -7,8 +7,7 @@ function greenprint {
}
# Get OS and architecture details.
source /etc/os-release
ARCH=$(uname -m)
source tools/set-env-variables.sh
# Register RHEL if we are provided with a registration script.
if [[ $ID == "rhel" && $VERSION_ID == "8.3" && -n "${RHN_REGISTRATION_SCRIPT:-}" ]] && ! sudo subscription-manager status; then

View file

@ -1,8 +1,7 @@
#!/bin/bash
set -euo pipefail
source /etc/os-release
DISTRO_CODE="${DISTRO_CODE:-${ID}_${VERSION_ID//./}}"
source tools/set-env-variables.sh
BRANCH_NAME="${BRANCH_NAME:-${CI_COMMIT_BRANCH}}"
BUILD_ID="${BUILD_ID:-${CI_BUILD_ID}}"