Closed rhmdnd closed 8 months ago
@rhmdnd: This pull request references CMP-2176 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "4.15." or "openshift-4.15.", but it targets "compliance-operator-1.4.0" instead.
/hold for test
I think the index image generation is more related with downstream(replace the placeholder version with the last released version) not upstream. I was not able to sqlite-based index image with two CO versions. But I was able to create a file-based index image with two CO versions. I think the final result still depends on how release team will handle the index image.
1, mkdir catalog
2, opm generate dockerfile catalog
3, create catalog-basic-veneer.yaml
$ cat catalog-basic-veneer.yaml
---
schema: olm.package
name: compliance-operator
defaultChannel: stable
---
schema: olm.channel
package: compliance-operator
name: stable
entries:
- name: compliance-operator.v1.1.0
- name: compliance-operator.v1.2.0
replaces: compliance-operator.v1.1.0
---
schema: olm.bundle
image: quay.io/xx/compliance-operator-bundle:pr-475
---
schema: olm.bundle
image: registry-proxy.engineering.redhat.com/rh-osbs/openshift-compliance-operator-bundle@sha256:97c96ec2481b95e189074b32837945187b4e350ce5e11902c984ae722ff06c9a
4, Generate index.yaml
opm alpha render-template basic catalog-basic-veneer.yaml -o yaml > catalog/index.yaml
5, validate catalog
opm validate catalog
6, build image
sudo docker buildx build . --push --platform linux/amd64 -f catalog.Dockerfile -t quay.io/xx/compliance-operator-catalog:pr-475
7. Verify the index images:
$ opm alpha list bundles quay.io/xx/compliance-operator-catalog:pr-475 compliance-operator
PACKAGE CHANNEL BUNDLE REPLACES SKIPS SKIP RANGE IMAGE
compliance-operator stable compliance-operator.v1.1.0 registry-proxy.engineering.redhat.com/rh-osbs/openshift-compliance-operator-bundle@sha256:97c96ec2481b95e189074b32837945187b4e350ce5e11902c984ae722ff06c9a
compliance-operator stable compliance-operator.v1.2.0 compliance-operator.v1.1.0 quay.io/xx/compliance-operator-bundle:pr-475
/unhold
/label qe-approved
@rhmdnd: This pull request references CMP-2176 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "4.16." or "openshift-4.16.", but it targets "compliance-operator-1.4.0" instead.
/test e2e-aws-parallel
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: rhmdnd, sheriff-rh, Vincent056
The full list of commands accepted by this bot can be found here.
The pull request process is described here
The
replaces
attribute of an operator's CSV helps OLM build relationships between operators, making it easier for users to install older versions of an operator (or know which version supercedes the version they're using).This commit reintroduces the
replaces
attribute, since it was being deleted before as a side-effect of an operator-sdk update. It should be safe to include again.