gitlab-ci: CI_BUILD_* vars were renamed to other things

https://web.archive.org/web/20190110134948/https://docs.gitlab.com/ee/ci/variables/#gitlab-90-renaming

Looks like GitLab v16 is finally removing the old names.

sed -i \
  -e s,CI_BUILD_TOKEN,CI_JOB_TOKEN,g \
  -e s,CI_BUILD_REF_SLUG,CI_COMMIT_REF_SLUG,g \
  -e s,CI_BUILD_REF_NAME,CI_COMMIT_REF_NAME,g \
  -e s,CI_BUILD_REPO,CI_REPOSITORY_URL,g \
  .gitlab-ci.yml
This commit is contained in:
Hans-Christoph Steiner 2023-05-05 10:15:18 +02:00
parent f7830a41f1
commit 3efe797bf8
1 changed files with 2 additions and 2 deletions

View File

@ -588,12 +588,12 @@ docker:
RELEASE_IMAGE: $CI_REGISTRY_IMAGE:buildserver
script:
# git ref names can contain many chars that are not allowed in docker tags
- export TEST_IMAGE=$CI_REGISTRY_IMAGE:$(printf $CI_BUILD_REF_NAME | sed 's,[^a-zA-Z0-9_.-],_,g')
- export TEST_IMAGE=$CI_REGISTRY_IMAGE:$(printf $CI_COMMIT_REF_NAME | sed 's,[^a-zA-Z0-9_.-],_,g')
- cd buildserver
- docker build -t $TEST_IMAGE --build-arg GIT_REV_PARSE_HEAD=$(git rev-parse HEAD) .
- docker tag $TEST_IMAGE $RELEASE_IMAGE
- docker tag $TEST_IMAGE ${RELEASE_IMAGE}-bullseye
- echo $CI_BUILD_TOKEN | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com
- echo $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com
# This avoids filling up gitlab.com free tier accounts with unused docker images.
- if test -z "$FDROID_PUSH_DOCKER_IMAGE"; then
echo "Skipping docker push to save quota on your gitlab namespace.";