Ensure upgrade CI jobs are named correctly (#5909)

pull/5977/head
Maxime Guyot 2020-04-18 15:05:36 +02:00 committed by GitHub
parent 6318bb9f96
commit bfa468c771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 3 deletions

View File

@ -2,9 +2,19 @@
set -euxo pipefail set -euxo pipefail
echo "CI_JOB_NAME is $CI_JOB_NAME" echo "CI_JOB_NAME is $CI_JOB_NAME"
pwd
ls if [[ "$CI_JOB_NAME" =~ "upgrade" ]]; then
echo ${PWD} if [ "${UPGRADE_TEST}" == "false" ]; then
echo "Job name contains 'upgrade', but UPGRADE_TEST='false'"
exit 1
fi
else
if [ "${UPGRADE_TEST}" != "false" ]; then
echo "UPGRADE_TEST!='false', but job names does not contain 'upgrade'"
exit 1
fi
fi
export ANSIBLE_REMOTE_USER=$SSH_USER export ANSIBLE_REMOTE_USER=$SSH_USER
export ANSIBLE_BECOME=true export ANSIBLE_BECOME=true