USHIFT-978 Building RPMs in container#1515
USHIFT-978 Building RPMs in container#1515openshift-merge-robot merged 1 commit intoopenshift:mainfrom
Conversation
There was a problem hiding this comment.
We're supporting RHEL 9 now in the main branch. Can we use RHEL9 containers / dependencies?
There was a problem hiding this comment.
This is because we use registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.19-openshift-4.13.
I see that rhel-9-release-golang-1.19-openshift-4.13 exists but it fails due to some certificates for rhel-9-for-x86_64-baseos-rpms repo.
Also, we're still using rhel-8-release-golang-1.19-openshift-4.13 in the CI jobs
There was a problem hiding this comment.
Let's simplify the process by having one top-level target?
We already have 'make rpm' & 'make srpm' - can we add 'make rpm-podman'?
There was a problem hiding this comment.
Good idea, I'll just jam both building the image (if doesn't exist) and and this target into one
|
A general question: why would we want to build in a container if we have a devenv? Are you thinking to use this for building 4.12 branch on a RHEL9 machine for example? |
We'll be able to use the same image CI uses, i.e. rhel8 (or 9) + go1.19 (which isn't available in the repos yet) and drop the workaround with installing two versions of Go, therefore fixing the microshift.spec to require right Go version (now we "require" 1.18, but it'll fail if 1.19 is not used). I feel like QE's pipeline would benefit from being able to build in a container. From what I've seen recently, they only run |
|
Should we also add "go" invocation from the container and get rid of the "go" dependency dillema in the devenv all together? I mean, we could remove "go" installation from configure-vm.sh and have container builds executed by default for compilation and RPM creation. |
Maybe, we need to think about this. |
8ccf333 to
6091274
Compare
I may have a different workflow from others on the team. I set up a VM with all of the dependencies and do all of my work in that VM, so I install my editor, the go compiler, gopls, git, etc. I have heard others say they build elsewhere and copy files into the VM, or at least edit elsewhere. |
6091274 to
4788820
Compare
There was a problem hiding this comment.
This test is neat. I usually just let podman build run again and it takes a second to realize there is no change, but this looks quicker.
There was a problem hiding this comment.
+1 on letting podman build figure out if there's a need to (re)build. It comes with a bonus of automatic rebuild when something changes in the Containerfile.
|
@pmtk , let's pull the Containerfile out of the hack directory. |
There was a problem hiding this comment.
Do we want to include a version in the image name, i.e. -t microshift-4.13-rpm-builder-rhel8-go1.19? I mean, we should be able to easily cross-compile from different branches on the same machine now, but images may be different.
4788820 to
206a83f
Compare
There was a problem hiding this comment.
Since we're building the container from make, can we simplify this by defining a variable in the Makefile and passiing it to the Containerfile?
Makefile:
GOLANG_CONTAINER=release:rhel-8-release-golang-1.19-openshift-4.13
podman build --env GOLANG_CONTAINER=$GOLANG_CONTAINER ...
Containerfile:
ENV GOLANG_CONTAINER
FROM registry.ci.openshift.org/openshift/$GOLANG_CONTAINER
There was a problem hiding this comment.
Following your suggestion, does microshift-builder:rhel-8-release-golang-1.19-openshift-4.13 sound good as an image name:tag?
There was a problem hiding this comment.
I think so, because the CI image name/version is the main identifier for it.
Unless, of course, there's a limitation in docker not allowing to use that name as-is.
206a83f to
1ec4536
Compare
1ec4536 to
91ac0ea
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ggiguash, pmtk The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@pmtk: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
No description provided.