Skip to content
Snippets Groups Projects
Commit 1c13117e authored by Andrew Newdigate's avatar Andrew Newdigate
Browse files

Merge branch 'fforster/semantic-release' into 'main'

chore(semantic-release): Print deprecation warning for `GITLAB_TOKEN`.

See merge request gitlab-com/gl-infra/common-ci-tasks!574
parents a650644b 1edf48ce
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -17,8 +17,12 @@ spec:
variables:
GITLAB_URL: $CI_SERVER_URL
before_script:
- if [[ -n "$SEMANTIC_RELEASE_GITLAB_TOKEN" ]]; then
export GITLAB_TOKEN=$SEMANTIC_RELEASE_GITLAB_TOKEN;
- |
if [[ -z "${SEMANTIC_RELEASE_GITLAB_TOKEN}" && -n "${GITLAB_TOKEN}" ]]; then
printf '\e[31;1m%s\e[0m\n' 'WARNING: GITLAB_TOKEN is deprecated -- use SEMANTIC_RELEASE_GITLAB_TOKEN instead'
fi
if [[ -n "${SEMANTIC_RELEASE_GITLAB_TOKEN}" ]]; then
export GITLAB_TOKEN="${SEMANTIC_RELEASE_GITLAB_TOKEN}"
fi
# Allow the semantic release job to fetch all the latest changes on the
# default branch before performing the semantic release.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment