Skip to content

ci(bin-image): don't set tags when pushing by digest#45930

Merged
crazy-max merged 1 commit intomoby:masterfrom
crazy-max:fix-moby-bin
Jul 11, 2023
Merged

ci(bin-image): don't set tags when pushing by digest#45930
crazy-max merged 1 commit intomoby:masterfrom
crazy-max:fix-moby-bin

Conversation

@crazy-max
Copy link
Copy Markdown
Member

follow-up #44740

- What I did

https://github.com/moby/moby/actions/runs/5523198400/jobs/10073797998#step:10:2961

#65 exporting to image
#65 exporting layers
#65 exporting layers 4.4s done
#65 exporting manifest sha256:f225c20202190ce50bd8e3c2f7466d847c1ab4e7620a8943b983c66d5a1daf3c done
#65 exporting config sha256:0d1da44af12ad680d8cff460d0207480728dd077716fd6367caed9d0e74fec82 done
#65 exporting attestation manifest sha256:a31ffac99ced8143782bc9b4ba81a990a0f6c21e906d7334f8114273a67868d7
#65 exporting attestation manifest sha256:a31ffac99ced8143782bc9b4ba81a990a0f6c21e906d7334f8114273a67868d7 done
#65 exporting manifest list sha256:adde00d7a67dee6df6a204aeaf7ec795b895c985ef5c4956a0eccef0e959bc3a done
#65 ERROR: failed to push moby-bin:local: can't push tagged ref docker.io/library/moby-bin:local by digest

We can't push tagged ref by digest obviously but forgot we also fallback to moby-bin:local tag in our bake definition:

tags = ["moby-bin:local"]

- How I did it

Just setting --set "*.tags=" fixes this issue.

- How to verify it

$ docker buildx bake bin-image --set "*.tags=" --print

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@crazy-max
Copy link
Copy Markdown
Member Author

Looks good.

Before: https://github.com/moby/moby/actions/runs/5497236920/jobs/10017805232?pr=44740#step:10:173

  {
    "group": {
      "default": {
        "targets": [
          "bin-image"
        ]
      }
    },
    "target": {
      "bin-image": {
        "attest": [
          "type=provenance,mode=max,builder-id=https://github.com/moby/moby/actions/runs/5497236920"
        ],
        "context": ".",
        "dockerfile": "Dockerfile",
        "args": {
          "APT_MIRROR": "",
          "BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
          "DEFAULT_PRODUCT_LICENSE": "Moby",
          "DOCKER_BUILDTAGS": "",
          "DOCKER_DEBUG": "",
          "DOCKER_GITCOMMIT": "HEAD",
          "DOCKER_LDFLAGS": "",
          "DOCKER_META_IMAGES": "moby/moby-bin",
          "DOCKER_META_VERSION": "pr-44740",
          "DOCKER_STATIC": "1",
          "PACKAGER_NAME": "Moby",
          "PLATFORM": "Moby Engine",
          "PRODUCT": "Moby",
          "VERSION": "refs/pull/44740/merge"
        },
        "labels": {
          "org.opencontainers.image.created": "2023-07-09T01:00:15.109Z",
          "org.opencontainers.image.description": "Moby Project - a collaborative project for the container ecosystem to assemble container-based systems",
          "org.opencontainers.image.licenses": "Apache-2.0",
          "org.opencontainers.image.revision": "0671a1c15e1b00cb8f844e8e3965991660123895",
          "org.opencontainers.image.source": "https://github.com/moby/moby",
          "org.opencontainers.image.title": "moby",
          "org.opencontainers.image.url": "https://github.com/moby/moby",
          "org.opencontainers.image.version": "pr-44740"
        },
        "tags": [
          "moby-bin:local"
        ],
        "target": "all",
        "platforms": [
          "windows/amd64"
        ],
        "output": [
          "type=image,name=moby/moby-bin,push-by-digest=true,name-canonical=true,push=false"
        ]
      }
    }
  }

After: https://github.com/moby/moby/actions/runs/5523327488/jobs/10074114688#step:7:132

  {
    "group": {
      "default": {
        "targets": [
          "bin-image"
        ]
      }
    },
    "target": {
      "bin-image": {
        "attest": [
          "type=provenance,mode=max,builder-id=https://github.com/moby/moby/actions/runs/5523327488"
        ],
        "context": ".",
        "dockerfile": "Dockerfile",
        "args": {
          "APT_MIRROR": "",
          "BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
          "DEFAULT_PRODUCT_LICENSE": "Moby",
          "DOCKER_BUILDTAGS": "",
          "DOCKER_DEBUG": "",
          "DOCKER_GITCOMMIT": "HEAD",
          "DOCKER_LDFLAGS": "",
          "DOCKER_META_IMAGES": "moby/moby-bin",
          "DOCKER_META_VERSION": "pr-45930",
          "DOCKER_STATIC": "1",
          "PACKAGER_NAME": "Moby",
          "PLATFORM": "Moby Engine",
          "PRODUCT": "Moby",
          "VERSION": "refs/pull/45930/merge"
        },
        "labels": {
          "org.opencontainers.image.created": "2023-07-11T18:01:57.324Z",
          "org.opencontainers.image.description": "Moby Project - a collaborative project for the container ecosystem to assemble container-based systems",
          "org.opencontainers.image.licenses": "Apache-2.0",
          "org.opencontainers.image.revision": "10d5d179a0b8544471e16519e77cfb1c57ccce47",
          "org.opencontainers.image.source": "https://github.com/moby/moby",
          "org.opencontainers.image.title": "moby",
          "org.opencontainers.image.url": "https://github.com/moby/moby",
          "org.opencontainers.image.version": "pr-45930"
        },
        "target": "all",
        "platforms": [
          "windows/amd64"
        ],
        "output": [
          "type=image,name=moby/moby-bin,push-by-digest=true,name-canonical=true,push=false"
        ]
      }
    }
  }

@crazy-max crazy-max requested a review from neersighted July 11, 2023 18:09
@crazy-max crazy-max marked this pull request as ready for review July 11, 2023 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants