ci/env.sh: Log `CI_BASE_BRANCH` (#33744)

When debugging CI failures it helps when I can see all the variables set
by `env.sh`.

Order environment variables in the output to match the order they are
set a bit better.

`CI_BASE_BRANCH` was not set at all for unknown environment.  Does not
matter much, but it seems consistent to include it in the list next to
all the other variables.
This commit is contained in:
Illia Bobyr 2023-10-17 20:20:59 -07:00 committed by GitHub
parent 0b05e8db11
commit 9baa0b1c02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -116,6 +116,7 @@ if [[ -n $CI ]]; then
else
export CI=
export CI_BRANCH=
export CI_BASE_BRANCH=
export CI_BUILD_ID=
export CI_COMMIT=
export CI_JOB_ID=
@ -131,10 +132,12 @@ fi
cat <<EOF
CI=$CI
CI_BRANCH=$CI_BRANCH
CI_BASE_BRANCH=$CI_BASE_BRANCH
CI_BUILD_ID=$CI_BUILD_ID
CI_COMMIT=$CI_COMMIT
CI_JOB_ID=$CI_JOB_ID
CI_OS_NAME=$CI_OS_NAME
CI_PULL_REQUEST=$CI_PULL_REQUEST
CI_OS_NAME=$CI_OS_NAME
CI_REPO_SLUG=$CI_REPO_SLUG
CI_TAG=$CI_TAG
EOF