From 3efe797bf8f84ecbe37268ab7428dad131e995d1 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 5 May 2023 10:15:18 +0200 Subject: [PATCH] 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 --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b790b2a..cc40911d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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.";