Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker-cilium-image target for DOCKER_FLAGS=--push #23679

Merged
merged 1 commit into from Feb 16, 2023

Conversation

pippolo84
Copy link
Member

When using the docker-cilium-image Makefile target with DOCKER_FLAGS set to --push and DOCKER_IMAGE_SUFFIX defined, each step of the build that reference the image name should take into account the specified suffix.

Instead, the build fails while trying to fetch and inspect the manifest:

$ DOCKER_DEV_ACCOUNT=docker.io/pippolo84 DOCKER_IMAGE_SUFFIX=-ci DOCKER_IMAGE_TAG=makefiletest DOCKER_FLAGS=--push make docker-cilium-image
...
docker buildx imagetools inspect docker.io/pippolo84/cilium:makefiletest
ERROR: docker.io/pippolo84/cilium:makefiletest: not found
make: *** [Makefile.docker:124: docker-cilium-image] Error 1

The error message highlights that the suffix is not added when generating the fully qualified image name in the manifest inspection command.

The commit adds the missing $(DOCKER_IMAGE_SUFFIX) variable to fix the issue.

Fixes: 3fd3691 ("build: Makefile support for DOCKER_IMAGE_SUFFIX, CI_BUILD, and KIND_LOAD")

When using the docker-cilium-image Makefile target with DOCKER_FLAGS set
to `--push` and DOCKER_IMAGE_SUFFIX defined, each step of the build that
reference the image name should take into account the specified suffix.

Instead, the build fails while trying to fetch and inspect the manifest:

```
$ DOCKER_DEV_ACCOUNT=docker.io/pippolo84 DOCKER_IMAGE_SUFFIX=-ci DOCKER_IMAGE_TAG=makefiletest DOCKER_FLAGS=--push make docker-cilium-image
...
docker buildx imagetools inspect docker.io/pippolo84/cilium:makefiletest
ERROR: docker.io/pippolo84/cilium:makefiletest: not found
make: *** [Makefile.docker:124: docker-cilium-image] Error 1
```

The error message highlights that the suffix is not added when
generating the fully qualified image name in the manifest inspection
command.

The commit adds the missing $(DOCKER_IMAGE_SUFFIX) variable to fix the
issue.

Fixes: 3fd3691 ("build: Makefile support for DOCKER_IMAGE_SUFFIX, CI_BUILD, and KIND_LOAD")

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
@pippolo84 pippolo84 requested a review from a team as a code owner February 11, 2023 11:44
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 11, 2023
@pippolo84 pippolo84 added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. release-note/bug This PR fixes an issue in a previous release of Cilium. labels Feb 11, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 11, 2023
@jrajahalme jrajahalme added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Feb 16, 2023
@jrajahalme
Copy link
Member

Marked as ready-to-merge as none of the CI is exercising this change anyway, and it is obviously correct :-)

@pchaigno pchaigno merged commit bff4ef9 into cilium:master Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants