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 GHA workflow to push operator images for PRs #972
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
look really good, a few remarks, feel free to decide on your own what would you like to take or not
8b04f0e
to
4ba7ad0
Compare
Codecov Report
@@ Coverage Diff @@
## master #972 +/- ##
=======================================
Coverage 54.27% 54.27%
=======================================
Files 23 23
Lines 1227 1227
=======================================
Hits 666 666
Misses 473 473
Partials 88 88 Continue to review full report at Codecov.
|
0bc7e5b
to
2b5824f
Compare
Signed-off-by: Pavel Macík <pavel.macik@gmail.com>
Motivation
Currently, the acceptance tests with OpenShift (on OpenShift CI) runs only in "local" mode which means it starts a local process of SBO instead of installing the operator into the OpenShift cluster. To make the environment closer to production one, our acceptance tests should run against clusters where the operator is installed using a catalog source or applying an installation yaml file.
ISSUE: https://issues.redhat.com/browse/APPSVC-794
Changes
This PR refactors GitHub worflows so that it build operator, bundle and index images from the PR (a.k.a. "PR images"), pushes it safely to
quay.io/redhat-developer/servicebinding-operator
repository with the following naming format:pr-<PR_NUMBER>-<8_CHAR_COMMIT_ID>
= operator imagepr-<PR_NUMBER>-<8_CHAR_COMMIT_ID>-bundle
= bundle imagepr-<PR_NUMBER>-<8_CHAR_COMMIT_ID>-image
= index imageThe GH actions for acceptance tests with Kubernetes waits for the above images to be pushed and then use them to run the acceptance test with.
The OpenShift CI jobs for running the acceptance tests are updated to use those images.
All the jobs are correlated through the name of the images based on PR number and the commit ID.
This PR also adds additional workflow that is triggerd when the PR is closed to delete the PR images related to the PR that generated them to make sure the remote repository is not flooded with past PR images.
Testing
I've tested the workflows in the fork repository via couple of PRs such as https://github.com/pmacik/service-binding-operator/pull/115/checks