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
Accomodate ART limitation in parsing [[]] bash #3669
Accomodate ART limitation in parsing [[]] bash #3669
Conversation
@@ -13,14 +13,14 @@ COPY --from=builder /go/src/github.com/openshift/machine-config-operator/instroo | |||
RUN cd / && tar xf /tmp/instroot.tar && rm -f /tmp/instroot.tar | |||
COPY install /manifests | |||
|
|||
RUN if [[ "${TAGS}" == "fcos" ]] || [[ "${TAGS}" == "scos" ]]; then \ | |||
RUN if [ "${TAGS}" = "fcos" ] || [ "${TAGS}" = "scos" ]; then \ |
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.
So, if memory serves correctly, we generate Dockerfile.rhel7
from our Dockerfile
using a make step. This change should probably also be made to our Dockerfile
as well. Other than that, this change seems fine.
The downstream build pipeline parses bash in Dockerfile `RUN` commands in order to smooth over yum/dnf invocations that break downstream builds. For example, upstream Dockerfiles may use `--disablerepo` / `--enablerepo` / `microdnf` -- none of which will work as intended in brew/koji builds. The intent of this feature is to allow, to a reasonable extent, teams to use the same Dockerfile for upstream and downstream -- preventing the overhead of managing two nearly identical files. When processing changes introduced by openshift@c1f5e35 , a limitation in the bashlex parser has been discovered where it cannot handle the (admittedly commonplace / proper) `[[ .. ]]` test syntax. Many OCP repos rely on this parsing feature, so the simplest course of action is to use the supported `[ .. ]` syntax in the MCO Dockerfile.
4e4c07b
to
f56c1d3
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, cheesesashimi, jupierce The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@jupierce: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions 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. |
4b2c9ac
into
openshift:master
/cherrypick release-4.13 |
@joepvd: new pull request created: #3671 In response to this:
Instructions 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. |
The downstream build pipeline parses bash in Dockerfile
RUN
commands in order to smooth over yum/dnf invocations that break downstream builds. For example, upstream Dockerfiles may use--disablerepo
/--enablerepo
/microdnf
-- none of which will work as intended in brew/koji builds.The intent of this feature is to allow, to a reasonable extent, teams to use the same Dockerfile for upstream and downstream -- preventing the overhead of managing two nearly identical files.
When processing changes introduced by c1f5e35 , a limitation in the bashlex parser has been discovered where it cannot handle the (admittedly commonplace / proper)
[[ .. ]]
test syntax.Many OCP repos rely on this parsing feature, so the simplest course of action is to use the supported
[ .. ]
syntax in the MCO Dockerfile.