-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add parametric workflow to generate community bundle #4
Add parametric workflow to generate community bundle #4
Conversation
Add new github workflow that generates bundle either for RH or K8s based on parameters. Signed-off-by: Carlo Lobrano <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: clobrano 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 |
git -C community add operators/${OPERATOR_NAME}/${VERSION} | ||
git -C community switch --create ${BRANCH} | ||
git -C community status | ||
git -C community commit -m "Add ${OPERATOR_NAME}-${VERSION}" |
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.
IIRC for k8s-operatorhub the commit should be signed off (append --signoff
to the).
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.
good catch, thank you
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.
nice!
2 suggestions inside
|
||
- name: Checkout Kubernetes Community Operators Hub | ||
uses: actions/checkout@v3 | ||
if: ${{ inputs.community == 'k8s-operatorhub' }} |
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.
Nice usage of conditional checkout based on inputs 👍🏼
Maybe use more generic input values though, these look very coupled to the repo name, which would be a pity in case the repo name changes. Maybe just "k8s" and "OKD" is good enough?
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.
Thanks :)
If the repo name changes we still have to change this workflow, but not the callers, SMGT
description: "The community to release the bundle to (either `k8s-operatorhub` or `redhat-openshift-ecosystem`)" | ||
required: true | ||
type: string | ||
recipe: |
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.
I had to look up what recipe means, maybe make_targets
would be more obvious?
The following is an example usage of this workflow |
Signed-off-by: Carlo Lobrano <[email protected]>
Avoid binding community input names to repository names, which are subject to changes. Using only K8S and OKD for simplicity Signed-off-by: Carlo Lobrano <[email protected]>
Signed-off-by: Carlo Lobrano <[email protected]>
/lgtm |
What this PR does / why we need it:
Add a reusable github workflow to automatically generate a bundle for RH or K8s Operator Hub and commit it to our Medik8s fork ready to be submitted to the Community project
Currently we have one workflow specific for RH Community, this new workflow reuses most of the same code to conditionally build and commit RH or K8s bundle based on parameters that the Operator's workflow must set in advance.
Test plan
I used https://github.com/nektos/act to reproduce the CI jobs locally
😁