Skip to content

Commit 5281ec0

Browse files
authored
fix(ci/lib-inject): pin buildx [backport #5496 to 1.11] (#5511)
v0.10 of buildx by default creates images which aren't compatible with gcr/aws lambda: https://github.com/docker/buildx/releases/tag/v0.10.0. This was causing the publish for the lib-injection images to fail when pushed to gcr: ``` 2023/04/06 21:22:10 Failed to publish image, err: publish failed for registry id: gcr-datadoghq, err: PUT https://gcr.io/v2/datadoghq/dd-lib-python-init/manifests/v1.11.1: MANIFEST_INVALID: Failed to parse manifest for request "/v2/datadoghq/dd-lib-python-init/manifests/v1.11.1": Failed to deserialize application/vnd.docker.distribution.manifest.list.v2+json. ``` Pin buildx to v0.9.1, the version prior to avoid this issue. ## Testing The fix was validated by rebuilding `v1.11.1` with buildx v0.9.1 and retrying the `build-images` job which succeeded. ## Risk This change pins the version for all builds that we do but given that v0.9.1 isn't that old it's probably a good thing to have it pinned anyway for deterministic building and publishing.
1 parent 4b141c0 commit 5281ec0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/build-and-publish-image.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
- name: Set up Docker Buildx
3030
id: buildx
3131
uses: docker/setup-buildx-action@v2
32+
with:
33+
# Images after this version (>=v0.10) are incompatible with gcr and aws.
34+
version: v0.9.1 # https://github.com/docker/buildx/issues/1533
3235
- name: Login to Docker
3336
run: docker login -u publisher -p ${{ secrets.token }} ghcr.io
3437
- name: Docker Build

0 commit comments

Comments
 (0)