OKD: Add build args for FCOS and SCOS#3294
OKD: Add build args for FCOS and SCOS#3294openshift-merge-robot merged 1 commit intoopenshift:masterfrom
Conversation
This change introduces the TAGS build-arg in `Dockerfile` which is propagated through to the Go build as a build constraint (aka build tag). Supported values for TAGS are `fcos` and `scos`, with `fcos` taking precedence if both are specified. This is necessary to modify the otherwise hard-coded imagestream tag `rhel-coreos-8` used for the RHCOS8 OS container image to be either `fedora-coreos` in OKD on FCOS, or `centos-stream-coreos-9` in OKD on SCOS.
83ee6a6 to
6fbc392
Compare
cgwalters
left a comment
There was a problem hiding this comment.
Thanks so much for diving into this!
| RUN if [[ "${TAGS}" == "fcos" ]]; then sed -i 's/rhel-coreos-8/fedora-coreos/g' /manifests/*; \ | ||
| elif [[ "${TAGS}" == "scos" ]]; then sed -i 's/rhel-coreos-8/centos-stream-coreos-9/g' /manifests/*; fi && \ |
There was a problem hiding this comment.
This looks totally fine as is but I think it'd be a bit nicer to have this be part of the Makefile flow so it's easier to do in local builds. IOW as is right now a local make will always do RHCOS, but it'd be nicer to support e.g. env OS=scos make to get e.g. a machine-config-daemon binary I can just copy to a node and run live without doing the whole container flow.
(But again, fine by me as is!)
There was a problem hiding this comment.
Good point! I'll take another look :)
|
/hold |
|
/lgtm @LorbusChris feel free to |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, LorbusChris 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 |
|
/hold cancel |
|
@LorbusChris: 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. |
Follow up to #3286
- What I did
This change introduces the TAGS build-arg in
Dockerfilewhich ispropagated through to the Go build as a build constraint (aka build tag).
Supported values for TAGS are
fcosandscos, withfcostakingprecedence if both are specified.
This is necessary to modify the otherwise hard-coded imagestream tag
rhel-coreos-8used for the RHCOS8 OS container image to be eitherfedora-coreosin OKD on FCOS, orcentos-stream-coreos-9in OKD onSCOS.
- How to verify it
podman build -f Dockerfile --build-arg TAGS="scos") has IS tag namedcentos-stream-coreos-9in/manifests/image-references- Description for the changelog
OKD: Add build args for FCOS and SCOS
/cc @cgwalters
/cc @vrutkovs