Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
IMAGE_NAME=quay.io/theforeman/candlepin
IMAGE_TAG=4.4.14
IMAGE_TAG=4.4.20-1

PROJECT_XY_TAG=4.4
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?


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.

podman tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${PROJECT_XY_TAG}
podman tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${PROJECT_XYZ_TAG}
podman tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${FOREMAN_XY_TAG}
podman tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${FOREMAN_XYZ_TAG}

push:
podman push ${IMAGE_NAME}:${IMAGE_TAG}
podman push ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${PROJECT_XY_TAG} ${IMAGE_NAME}:${PROJECT_XYZ_TAG} ${IMAGE_NAME}:${FOREMAN_XY_TAG} ${IMAGE_NAME}:${FOREMAN_XYZ_TAG}
12 changes: 2 additions & 10 deletions images/candlepin/Containerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
FROM quay.io/centos/centos:stream9
ARG TAG=nightly

RUN dnf -y update && \
dnf clean all

RUN dnf -y --nodocs --setopt install_weak_deps=False install \
https://yum.theforeman.org/candlepin/4.4/el9/x86_64/candlepin-4.4.14-1.el9.noarch.rpm \
https://yum.theforeman.org/candlepin/4.4/el9/x86_64/candlepin-selinux-4.4.14-1.el9.noarch.rpm && \
dnf clean all

CMD ["/usr/libexec/tomcat/server", "start"]
FROM quay.io/candlepin/candlepin:${TAG}