From 66389b74c290a0a21820c13e5a110418e51474ae Mon Sep 17 00:00:00 2001 From: Zedifus Date: Sun, 14 May 2023 19:33:20 +0100 Subject: [PATCH 1/3] Change deprecated pre-def gitlab registry variable `CI_BUILD_TOKEN` deprecated in recent Gitlab 16 update https://docs.gitlab.com/ee/update/deprecations.html#ci_build_-predefined-variables --- .gitlab/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/docker-build.yml b/.gitlab/docker-build.yml index 4c906e4e..b7a35afa 100644 --- a/.gitlab/docker-build.yml +++ b/.gitlab/docker-build.yml @@ -28,7 +28,7 @@ docker-build-dev: docker version - docker run --rm --privileged aptman/qus -- -r - docker run --rm --privileged aptman/qus -s -- -p aarch64 x86_64 - - echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY + - echo $CI_JOB_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY - echo $DOCKERHUB_TOKEN | docker login -u "$DOCKERHUB_USER" --password-stdin $DOCKERHUB_REGISTRY script: - | @@ -84,7 +84,7 @@ docker-build-prod: docker version - docker run --rm --privileged aptman/qus -- -r - docker run --rm --privileged aptman/qus -s -- -p aarch64 x86_64 - - echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY + - echo $CI_JOB_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY - echo $DOCKERHUB_TOKEN | docker login -u "$DOCKERHUB_USER" --password-stdin $DOCKERHUB_REGISTRY script: - | From 4b0147e65402b15295bf0faf809cb93b7682bbd9 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Sun, 14 May 2023 19:34:38 +0100 Subject: [PATCH 2/3] Fix gitlab registry digest information with provenance workaround docker buildx as of v0.10.0 defaults to using SLSA Provenance for multi architecture builds. Pushing an image built with buildx to Gitlab results in a tag with empty manifest data. https://gitlab.com/gitlab-org/gitlab/-/issues/388865 --- .gitlab/docker-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/docker-build.yml b/.gitlab/docker-build.yml index b7a35afa..aa578e97 100644 --- a/.gitlab/docker-build.yml +++ b/.gitlab/docker-build.yml @@ -45,6 +45,7 @@ docker-build-dev: --build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")" --build-arg "BUILD_REF=${CI_COMMIT_SHA}" --build-arg "CRAFTY_VER=${VERSION}" + --provenance false --tag "$CI_REGISTRY_IMAGE${tag}" --tag "arcadiatechnology/crafty-4${tag}" --platform linux/arm64/v8,linux/amd64 @@ -100,6 +101,7 @@ docker-build-prod: --build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")" --build-arg "BUILD_REF=${CI_COMMIT_SHA}" --build-arg "CRAFTY_VER=${VERSION}" + --provenance false --tag "$CI_REGISTRY_IMAGE:$VERSION" --tag "$CI_REGISTRY_IMAGE:latest" --tag "arcadiatechnology/crafty-4:$VERSION" From 7a358391d7ceeb4667cb01d03108d738f753d903 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Sun, 14 May 2023 19:52:11 +0100 Subject: [PATCH 3/3] Update changelog !582 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f433dd50..1c84c26f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ### New features TBD ### Bug fixes -TBD +- Fix pipelines failing to build from gitlab pre-defined variable deprecation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/582)) +- Fix incompatible buildx provenance meta, causing digest issues on GL/DH container registries ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/582)) ### Tweaks TBD ### Lang