Skip to content

Use container image from Candlepin officially#2

Open
ehelms wants to merge 1 commit intomasterfrom
use-candlepin-container
Open

Use container image from Candlepin officially#2
ehelms wants to merge 1 commit intomasterfrom
use-candlepin-container

Conversation

@ehelms
Copy link
Member

@ehelms ehelms commented Apr 22, 2025

This will re-use the Candlepin container image produced by the Candlepin project and then tags it according to the tagging rules using project and Foreman version tags.

PROJECT_XYZ_TAG=4.4.20

FOREMAN_XY_TAG=3.15
FOREMAN_XYZ_TAG=3.15.0
Copy link
Member Author

Choose a reason for hiding this comment

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

We'll end up managing these versions across multiple of these repositories and I wonder how to properly keep this in sync. This could perhaps instead be handled at the CI level rather than here?

@ekohl Could your ideas around shared Github Actions help?

Copy link
Member

Choose a reason for hiding this comment

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

I know Vox uses https://github.com/voxpupuli/gha-build-and-publish-a-container but must say I haven't used it myself. Perhaps something to look at? Though I also like the idea of being able to build locally.

Then I also wonder about putting it into files vs using git tags. Though changing a tag will be a really bad idea, it could be easy for visibility that it's really the same thing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Then I also wonder about putting it into files vs using git tags. Though changing a tag will be a really bad idea, it could be easy for visibility that it's really the same thing.

And would we git tag all the container tags for parity?

Copy link
Member

Choose a reason for hiding this comment

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

That was my thinking, but I don't know how feasible it really is. Perhaps foreman-x.y should really be a branch and foreman-x.y.z a tag. Then we'd need x.y.z-a for bugfixes though.

Perhaps we leave out x.y.z altogether?

Makefile Outdated
podman tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${FOREMAN_XYZ_TAG}

push:
podman push ${IMAGE_NAME}:${IMAGE_TAG}
Copy link
Member

Choose a reason for hiding this comment

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

This should probably push all tags, right?


build:
podman build -f images/candlepin/Containerfile -t ${IMAGE_NAME}:${IMAGE_TAG} .
podman build --file images/candlepin/Containerfile --tag ${IMAGE_NAME}:${IMAGE_TAG} --build-arg TAG=${IMAGE_TAG}
Copy link
Member

Choose a reason for hiding this comment

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

Why not

podman pull quay.io/candlepin/candlepin:${TAG}
podman tag quay.io/candlepin/candlepin:${IMAGE_TAG} ${IMAGE_NAME}:${IMAGE_TAG}

The build feels weird given we're not actually building.
Or is that a setup to allow changes in the future?

Copy link
Member Author

Choose a reason for hiding this comment

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

Allowing change, #3 starts to show that.

This will re-use the Candlepin container image produced by the Candlepin
project and then tags it according to the tagging rules using project
and Foreman version tags.
@ehelms
Copy link
Member Author

ehelms commented May 12, 2025

I moved the bulk of this to #4 as the how we handle tagging can be done prior to any swap of the image.

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.

3 participants