Skip to content

Commit 4625226

Browse files
authored
Merge pull request #143 from lipoja/update_doc
Adding example of using variables to set additional opm arguments
2 parents 569d619 + ec8cd09 commit 4625226

File tree

5 files changed

+30
-8
lines changed

5 files changed

+30
-8
lines changed

.tekton/gatekeeper-fbc-v413-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ spec:
190190
- name: IDMS_PATH
191191
value: ".tekton/images-mirror-set.yaml"
192192
- name: FILE_TO_UPDATE_PULLSPEC
193-
value: "v4.13/catalog-template.json"
193+
value: "v4.13/catalog/gatekeeper-operator/catalog.json"
194194
runAfter:
195195
- clone-repository
196196
taskRef:

.tekton/gatekeeper-fbc-v413-push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ spec:
187187
- name: IDMS_PATH
188188
value: ".tekton/images-mirror-set.yaml"
189189
- name: FILE_TO_UPDATE_PULLSPEC
190-
value: "v4.13/catalog-template.json"
190+
value: "v4.13/catalog/gatekeeper-operator/catalog.json"
191191
runAfter:
192192
- clone-repository
193193
taskRef:

.tekton/images-mirror-set.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ metadata:
66
spec:
77
imageDigestMirrors:
88
- mirrors:
9-
- yet-to-be-released-example.com/redhat-user-workloads/konflux-samples-tenant/olm-operator/gatekeeper-operator-bundle
10-
source: quay.io/redhat-user-workloads/konflux-samples-tenant/olm-operator/gatekeeper-operator-bundle
9+
- quay.io/redhat-user-workloads/konflux-samples-tenant/olm-operator/gatekeeper-operator-bundle
10+
source: registry.redhat.io/gatekeeper/gatekeeper-operator-bundle

docs/konflux-building-catalog.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For the `run-opm-command` task, you must set the following parameters: `OPM_ARGS
2222
- name: IDMS_PATH
2323
value: ".tekton/images-mirror-set.yaml"
2424
- name: FILE_TO_UPDATE_PULLSPEC
25-
value: "v4.13/catalog-template.json"
25+
value: "v4.13/catalog/gatekeeper-operator/catalog.json"
2626
```
2727
2828
Note: For OCP version >= v4.17 you have to add `--migrate-level=bundle-object-to-csv-metadata` as well.
@@ -40,7 +40,29 @@ Example for OCP >= v4.17:
4040
- name: IDMS_PATH
4141
value: ".tekton/images-mirror-set.yaml"
4242
- name: FILE_TO_UPDATE_PULLSPEC
43-
value: "v4.18/catalog-template.json"
43+
value: "v4.13/catalog/gatekeeper-operator/catalog.json"
44+
```
45+
46+
Example of using `--migrate-level` parameter with `run-opm-command`.
47+
First, you need to create a parameter under `spec.params`:
48+
```yaml
49+
params:
50+
name: opm-args
51+
description: Additional OPM arguments (e.g., ["--migrate-level=bundle-object-to-csv-metadata"] for v4.17+)
52+
type: array
53+
default: []
54+
```
55+
56+
This parameter can then be used in `OPM_ARGS` as follows:
57+
```yaml
58+
59+
- name: OPM_ARGS
60+
value:
61+
- alpha
62+
- render-template
63+
- basic
64+
- catalog/$(params.catalog).yaml
65+
- $(params.opm-args[*])
4466
```
4567

4668
**Description of variables:**
@@ -49,7 +71,7 @@ Example for OCP >= v4.17:
4971
- `OPM_OUTPUT_PATH`: The path where the output from `opm` will be stored (i.e., where `catalog.json` will be saved).
5072
- Note: This task supports only the JSON format for catalog generation.
5173
- `IDMS_PATH`: The path to the ImageDigestMirrorSet file in YAML format.
52-
- `FILE_TO_UPDATE_PULLSPEC`: Relative path to a file (e.g., catalog-template.yml) in which pullspecs should be updated.
74+
- `FILE_TO_UPDATE_PULLSPEC`: Relative path to a file (e.g., `catalog.json`) in which pullspecs should be updated.
5375

5476
Examples of complete `fbc-builder` pipeline configurations can be found in [PR#132](https://github.com/konflux-ci/olm-operator-konflux-sample/pull/132):
5577

v4.13/catalog-template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
},
9898
{
9999
"schema": "olm.bundle",
100-
"image": "yet-to-be-released-example.com/redhat-user-workloads/konflux-samples-tenant/olm-operator/gatekeeper-operator-bundle:d5fb5100da6049bad5ddaa1362662f30cf5112d9"
100+
"image": "quay.io/redhat-user-workloads/konflux-samples-tenant/olm-operator/gatekeeper-operator-bundle:d5fb5100da6049bad5ddaa1362662f30cf5112d9"
101101
}
102102
]
103103
}

0 commit comments

Comments
 (0)