1- # Operator pipelines
1+ # Red Hat ISV Operator Certification Pipelines
22
3- ## Prerequisites
3+ Red Hat OpenShift pipelines for certifying ISV Operator Bundles.
44
5- ** To run any of the pipelines for the first time, multiple cluster resources has to be created. **
5+ ## Getting Started
66
7- See [ first-time-run.md ] ( docs/first-time-run .md )
7+ Refer to the [ developer guide ] ( docs/developer-guide .md ) .
88
9- ** To publish the image to OCP registry, cluster with registry should be prepared at first.**
9+ > ** Note** : This documentation is intended for pipeline ** developers/maintainers** only.
10+ >
11+ > Partners/users should refer to
12+ [ this] ( https://github.com/redhat-openshift-ecosystem/certification-releases/blob/main/4.9/ga/operator-cert-workflow.md )
13+ documentation instead.
1014
11- See one-time actions necessary to prepare new cluster: [ rhc4tp-cluster.md ] ( docs/rhc4tp-cluster.md )
15+ ## Usage
1216
13- ## Local setup
14- To create local cluster for sake of testing the pipelines, see [ local-dev.md] ( docs/local-dev.md )
17+ ### Operator CI Pipeline
1518
19+ The Operator CI pipeline is a Tekton pipeline that can be triggered by a partner on on-premise
20+ infrastructure. The pipeline validates an Operator Bundle, builds it and install it to an OpenShift
21+ environment. After installation pre-flight tests are executed which validate that the Operator meets
22+ minimum requirements for Red Hat OpenShift Certification. If all preceding tasks pass the CI pipeline
23+ optionally uploads results and submits a pull request to trigger the next stages of the operator
24+ certification workflow.
1625
17- ## Operator CI pipeline
26+ > ** Note: ** Execution of the CI pipeline is NOT required in the overall certification workflow.
1827
19- Operator CI pipeline is a pipeline that can be triggered by partner on on-premise
20- infrastructure. The pipeline does basic check of new operator, build it and install
21- it in ocp environment. After an operator is installed a pre-flight tests are executed
22- that validates that operator meets minimum requirements for Red Hat OpenShift Certification.
23- If tests pass a CI pipeline submits a PR for full operator certification workflow.
24-
25- ### Installation
26- ``` bash
27- oc apply -R -f ansible/roles/operator-pipeline/templates/openshift/pipelines/operator-ci-pipeline.yml
28- oc apply -R -f ansible/roles/operator-pipeline/templates/openshift/tasks
29- ```
30-
31- ### Execution
3228If using the default internal registry, the CI pipeline can be triggered using the tkn CLI like so:
3329
3430``` bash
3531tkn pipeline start operator-ci-pipeline \
3632 --use-param-defaults \
37- --param git_repo_url=git@ github.com: redhat-openshift-ecosystem/operator-pipelines-test.git \
33+ --param git_repo_url=https:// github.com/ redhat-openshift-ecosystem/operator-pipelines-test.git \
3834 --param git_branch=main \
3935 --param bundle_path=operators/kogito-operator/1.6.0-ok \
4036 --param env=prod \
4137 --workspace name=pipeline,volumeClaimTemplateFile=templates/workspace-template.yml \
4238 --workspace name=kubeconfig,secret=kubeconfig \
43- --workspace name=ssh-dir,secret=github-ssh-credentials \
4439 --workspace name=pyxis-api-key,secret=pyxis-api-secret \
4540 --showlog
4641```
@@ -49,7 +44,7 @@ If using an external registry, the CI pipeline can be triggered using the tkn CL
4944``` bash
5045tkn pipeline start operator-ci-pipeline \
5146 --use-param-defaults \
52- --param git_repo_url=git@ github.com: redhat-openshift-ecosystem/operator-pipelines-test.git \
47+ --param git_repo_url=https:// github.com/ redhat-openshift-ecosystem/operator-pipelines-test.git \
5348 --param git_branch=main \
5449 --param bundle_path=operators/kogito-operator/1.6.0-ok \
5550 --param env=prod \
@@ -62,8 +57,8 @@ tkn pipeline start operator-ci-pipeline \
6257 --showlog
6358```
6459
65- To enable opening the PR and uploading the pipeline logs (visible to logs owner in Red Hat Ecosystem Catalog),
66- pass the following argument:
60+ To enable opening the PR and uploading the pipeline logs (visible to the certification project
61+ owner in Red Hat Connect), pass the following argument:
6762
6863``` bash
6964 --param submit=true
@@ -80,28 +75,29 @@ To enable digest pinning, pass the following arguments:
8075
8176``` bash
8277 --param pin_digests=true \
78+ --param git_repo_url=< github_repo_ssh_url> \
8379 --param git_username=< github_user_name> \
8480 --param git_email=< github_email> \
8581 --workspace name=ssh-dir,secret=github-ssh-credentials
8682```
8783
88- If any of bundle's related images is stored in private registry user needs to
89- provide registry tokens for all used private registries. See more details about
90- how to provide registry token in [ first-time-run.md] ( docs/first-time-run.md ) .
84+ > ** Note:** The ` git_repo_url ` param needs an SSH URL to commit the pinned digests.
9185
92- ## Operator Hosted pipeline
93- The Hosted Operator Certification Pipeline is used as a validation of the operator
94- bundles. It’s an additional (to CI pipeline) layer of validation that has to run within
95- the Red Hat infrastructure. It contains multiple steps from the CI pipeline, making the CI pipeline optional.
96- It is triggered by creating the submission pull request, and successfully completes with merging it.
86+ If any of bundle's related images are stored in a private registry the user needs to provide tokens
87+ to pull from those registries. See more details about how to provide registry tokens in the
88+ [ pipeline environment setup documentation] ( docs/pipeline-env-setup.md#registry-credentials ) .
9789
98- ### Installation
99- ``` bash
100- oc apply -R -f ansible/roles/operator-pipeline/templates/openshift/pipelines/operator-hosted-pipeline.yml
101- oc apply -R -f ansible/roles/operator-pipeline/templates/openshift/tasks
102- ```
90+ ### Operator Hosted Pipeline
91+
92+ The hosted pipeline is used to certify the Operator bundles.
93+ It’s an additional (to CI pipeline) layer of validation that has to run within
94+ the Red Hat infrastructure. It is intended to be triggered upon the creation of a
95+ bundle pull request and successfully completes with merging it (configurable).
96+
97+ > ** Note:** Execution of the hosted pipeline is ALWAYS required in the overall certification workflow.
98+ Prior execution of the CI pipeline may influence its behavior if results were submitted. Preflight
99+ testing may be skipped in such a case.
103100
104- ### Execution
105101The hosted pipeline can be triggered using the tkn CLI like so:
106102
107103``` bash
@@ -131,28 +127,18 @@ tkn pipeline start operator-hosted-pipeline \
131127 --showlog
132128```
133129
134- :warning : Only quay-based registries are supported by the hosted pipeline.
130+ > :warning : Only quay-based registries are supported by the hosted pipeline.
135131 There are some quay specific tasks for configuring the repositories where
136132the bundle and index images are pushed.
137133
134+ ### Operator Release Pipeline
138135
139- ## Operator Release pipeline
140- The Release pipeline runs after the layers of validation (CI (optionally) and Hosted pipeline).
141- It is used to certify and publish submitted bundle version.
142- It is triggered by a merged pull request and successfully completes
143- once the bundle has been distributed to all relevant Operator catalogs and appears in the Red Hat Ecosystem Catalog.
144-
136+ The release pipeline is responsible for releasing a bundle image which has passed certification.
137+ It's intended to be triggered by the merge of a bundle pull request by the hosted pipeline.
138+ It successfully completes once the bundle has been distributed to all relevant Operator catalogs
139+ and appears in the Red Hat Ecosystem Catalog.
145140
146-
147- ### Installation
148-
149- ``` bash
150- oc apply -R -f ansible/roles/operator-pipeline/templates/openshift/pipelines/operator-release-pipeline.yml
151- oc apply -R -f ansible/roles/operator-pipeline/templates/openshift/tasks
152- ```
153-
154- ### Execution
155- The release pipeline can be triggered using the tkn CLI like so:
141+ > ** Note:** Execution of the release pipeline is ALWAYS required in the overall certification workflow.
156142
157143``` bash
158144tkn pipeline start operator-release-pipeline \
@@ -172,21 +158,11 @@ tkn pipeline start operator-release-pipeline \
172158 --showlog
173159```
174160
175- # operator-pipelines-images
176- Container images containing the set of tools for Partner Operator Bundle [ certification pipelines] ( https://github.com/redhat-openshift-ecosystem/operator-pipelines ) .
177-
178- ## Development
179-
180- To install the python package in a development environment, run:
181-
182- ``` bash
183- pip install " .[dev]"
184- ```
185-
186- To test the scripts with the pipelines, see [ local-dev.md] ( docs/local-dev.md ) .
161+ ### Using a Custom Pipeline Image
187162
188- To run unit tests and code style checkers:
163+ All the pipelines share a common pipeline image for many of the steps.
164+ This image can be overridden by passing the following to any ` tkn pipeline start ` command.
189165
190166``` bash
191- tox
167+ --param pipeline_image= < image-pull-spec >
192168```
0 commit comments