-
Notifications
You must be signed in to change notification settings - Fork 111
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
NO-JIRA: ci/get-ocp-repo.sh: add --output-dir
#1702
NO-JIRA: ci/get-ocp-repo.sh: add --output-dir
#1702
Conversation
Prep for adding another option, which would then make the getopt option more obviously cleaner than the ad-hoc approach.
There is no cosa workdir when building the extensions image or the node image and so we shouldn't reference the `cosa_workdir` variable. Instead output the repo file to the same directory in which the OCP manifest is.
In the node layering case, we're directly bind-mounting the build context dir. It's mounted read-only, so we can't write `ocp.repo` there. And even if we could, we shouldn't modify the build context if we don't need to. Add a new `--output-dir` option to allow changing the directory to which to write `ocp.repo`. Use this in the node layering flow to output to `/run/yum.repos.d`, which is an already established API for transient repo definitions.
This was successfully tested in openshift/release#59490 (well, the node layering flow). |
@jlebon: all tests passed! 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-sigs/prow repository. I understand the commands that are listed here. |
*) echo "$0: invalid argument: $1" >&2; exit 1;; | ||
esac | ||
shift | ||
done |
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.
previously --cosa-workdir
and --ocp-layer
were exclusive, or at least only the first one would be considered. Do we want to do anything specific if a user passed both here?
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.
Yeah... when switching to getopt, keeping that check didn't feel worth the lines. The current behaviour of just letting --ocp-layer
win seemed fine to me. This script doesn't need a lot of polish. All users of it are in this repo.
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.
/approve
--output-dir
--output-dir
@jlebon: This pull request explicitly references no jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dustymabe, jlebon 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 |
This is only used in CI, which passed. /label acknowledge-critical-fixes-only |
In the node layering case, we're directly bind-mounting the build context dir. It's mounted read-only, so we can't write
ocp.repo
there. And even if we could, we shouldn't modify the build context if we don't need to.Add a new
--output-dir
option to allow changing the directory to which to writeocp.repo
. Use this in the node layering flow to output to/run/yum.repos.d
, which is an already established API for transient repo definitions.