Release UBI images directly from gitlab registry instead of building them in the operator pipelines and push operator and bundle images to GitLab registry
With this MR:
- For tags the
redhat-ubi-images
job will be ran. It will pull an image corresponding to theAPP_VERSION
variable in the Makefile from gitlab registry and push it into the RedHat registry. The UBI images are being built in theubi
repo for each GitLab Runner release. Relevant MR: gitlab-org/ci-cd/gitlab-runner-ubi-images!13 (merged) - For tags the
redhat-operator-image
andredhat-operator-bundle-image
jobs will be ran. They will build and push the operator and operator bundle images to the RedHat registry. - For all other commits, as well as the tags the
upstream-operator-image
andupstream-operator-bundle-image
jobs will push either0.0.1-commit_hash
or the tag, which would be the actual release. As a result, for each commit we will have the images on gitlab registry for the bundle and the operator with a tag0.0.1-commit_hash
. As a follow-up MR we will publish a catalog source which will make testing each pipeline commit super easy.
Best way to test this MR:
- Make sure pipeline are passing and the published images are OK
- Install the built operator by building a CatalogSource based on the pipeline images, e.g.
opm index add --bundles registry.gitlab.com/gitlab-org/gl-openshift/gitlab-runner-operator/gitlab-runner-operator-bundle:v0.0.1-4cc2d172 --tag gngeorgiev/gitlab-runner-operator-catalogsource:4cc2d172 --build-tool docker
or straight up usegngeorgiev/gitlab-runner-operator-catalogsource:4cc2d172
since that's already published. Relevant job log location https://gitlab.com/gitlab-org/gl-openshift/gitlab-runner-operator/-/jobs/1087747739#L465
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: gitlab-runner-operator-catalog
namespace: openshift-marketplace
spec:
sourceType: grpc
image: gngeorgiev/gitlab-runner-operator-catalogsource:4cc2d172
displayName: Gitlab Runner Operator Catalog
publisher: GitLab
updateStrategy:
registryPoll:
interval: 30m
Edited by Georgi N. Georgiev