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

chore(build): publish no release images with -dev suffix #12661

Closed
wants to merge 4 commits into from

Conversation

lukidzi
Copy link
Contributor

@lukidzi lukidzi commented Jan 24, 2025

Motivation

We want to separate release images from the ones that we build.

Implementation

When the version has preview scripts add a suffix dev to the repository

example:
when tag: kuma-dp, kuma-init, kuma-cp, kumactl, kuma-dni
other: kuma-dp-dev, kuma-init-dev, kuma-cp-dev, kumactl-dev, kuma-cni-dev

fix: #12508

Signed-off-by: Lukasz Dziedziak <[email protected]>
@lukidzi lukidzi changed the title chore(docker): publish no release images with -dev suffix chore(build): publish no release images with -dev suffix Jan 24, 2025
Copy link
Contributor

Reviewer Checklist

🔍 Each of these sections need to be checked by the reviewer of the PR 🔍:
If something doesn't apply please check the box and add a justification if the reason is non obvious.

  • Is the PR title satisfactory? Is this part of a larger feature and should be grouped using > Changelog?
  • PR description is clear and complete. It Links to relevant issue as well as docs and UI issues
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as an image registry)
  • IPv6 is taken into account (.e.g: no string concatenation of host port)
  • Tests (Unit test, E2E tests, manual test on universal and k8s)
    • Don't forget ci/ labels to run additional/fewer tests
  • Does this contain a change that needs to be notified to users? In this case, UPGRADE.md should be updated.
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label)

@lukidzi lukidzi changed the title chore(build): publish no release images with -dev suffix chore(build): publish no release images with -dev suffix Jan 24, 2025
Signed-off-by: Lukasz Dziedziak <[email protected]>
Signed-off-by: Lukasz Dziedziak <[email protected]>
@lukidzi lukidzi marked this pull request as ready for review January 27, 2025 12:05
@lukidzi lukidzi requested a review from a team as a code owner January 27, 2025 12:05
@lukidzi lukidzi requested review from slonka and bartsmykla January 27, 2025 12:05
define build_image
$(addsuffix :$(BUILD_INFO_VERSION)$(if $(2),-$(2)),$(addprefix $(DOCKER_REGISTRY)/,$(1)))
$(addsuffix :$(BUILD_INFO_VERSION)$(if $(2),-$(2)),$(addprefix $(DOCKER_REGISTRY)/,$(1)$(DOCKER_DEV_IMAGE_SUFFIX)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't be actually just do:

$(DOCKER_REGISTRY)/$(if $(2),$(2)-)$(1)$(if $(DOCKER_DEV_IMAGE_SUFFIX),-$(DOCKER_DEV_IMAGES_SUFFIX)):$(BUILD_INFO_VERSION)

Seems like it's equivalent and more readable to me no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also any specific rational for prefix vs suffix?

Copy link
Contributor Author

@lukidzi lukidzi Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@lahabana lahabana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually there's been further thinking around this and we're looking at using a different registry for non released images.

I think that for Kuma it'll likely be GHCR. This is TBD but I'd close this until we make a decision

ifneq ($(strip $(IMAGES_REPOSITORY_SUFFIX)),)
DOCKER_DEV_IMAGE_SUFFIX = -$(IMAGES_REPOSITORY_SUFFIX)
endif
endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the indirection? Feels like we could use IMAGE_REPOSITORY_SUFFIX directly in the script no?

define build_image
$(addsuffix :$(BUILD_INFO_VERSION)$(if $(2),-$(2)),$(addprefix $(DOCKER_REGISTRY)/,$(1)))
$(addsuffix :$(BUILD_INFO_VERSION)$(if $(2),-$(2)),$(addprefix $(DOCKER_REGISTRY)/,$(1)$(DOCKER_DEV_IMAGE_SUFFIX)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also any specific rational for prefix vs suffix?

@lukidzi
Copy link
Contributor Author

lukidzi commented Feb 3, 2025

Actually there's been further thinking around this and we're looking at using a different registry for non released images.

I think that for Kuma it'll likely be GHCR. This is TBD but I'd close this until we make a decision

Ok, I can close it for now, and once we agree we can reopen with the provided review suggestions

@lukidzi lukidzi closed this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Push nightlies to a different docker repository
2 participants