-
Notifications
You must be signed in to change notification settings - Fork 337
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
Conversation
Signed-off-by: Lukasz Dziedziak <[email protected]>
Signed-off-by: Lukasz Dziedziak <[email protected]>
Reviewer Checklist🔍 Each of these sections need to be checked by the reviewer of the PR 🔍:
|
Signed-off-by: Lukasz Dziedziak <[email protected]>
Signed-off-by: Lukasz Dziedziak <[email protected]>
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))) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel suffix is more used in different repos:
https://hub.docker.com/r/kong/kong-gateway-dev
https://hub.docker.com/r/kong/kong-dev
https://hub.docker.com/r/envoyproxy/envoy-dev
There was a problem hiding this 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 |
There was a problem hiding this comment.
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))) |
There was a problem hiding this comment.
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?
Ok, I can close it for now, and once we agree we can reopen with the provided review suggestions |
Motivation
We want to separate release images from the ones that we build.
Implementation
When the version has
preview
scripts add a suffixdev
to the repositoryexample:
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