Skip to content
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

Use git describe for finding operator version #500

Merged

Conversation

rhmdnd
Copy link

@rhmdnd rhmdnd commented Apr 1, 2024

We need to be able to set the replaces attribute of the CSV file so
that OLM can build a relationship between dependencies, which is
important for disconnected installations and upgrades.

Previously, we were using the version in the CSV file, which worked but
it would change within the make prepare-release target depending on
when the command was invoked.

This commit updates the version script to use git describe instead,
which makes finding the current version more robust since tagging isn't
done until a subsequent step of the release process.

@BhargaviGudi
Copy link
Collaborator

/hold for test

@BhargaviGudi
Copy link
Collaborator

Verification passed with 4.16.0-0.nightly-2024-04-01-213440 + compliance-operator from pr #500 code

$ oc get csv
NAME                         DISPLAY               VERSION   REPLACES   PHASE
compliance-operator.v1.4.0   Compliance Operator   1.4.0                Succeeded
$ git describe --tags --abbrev=0 | tr -d v
1.4.0

@BhargaviGudi
Copy link
Collaborator

/unhold

@BhargaviGudi
Copy link
Collaborator

/label qe-aprroved

Copy link

openshift-ci bot commented Apr 2, 2024

@BhargaviGudi: The label(s) /label qe-aprroved cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, no-qe, downstream-change-needed, rebase/manual, cluster-config-api-changed, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

/label qe-aprroved

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

utils/get-current-version.sh Outdated Show resolved Hide resolved
We need to be able to set the `replaces` attribute of the CSV file so
that OLM can build a relationship between dependencies, which is
important for disconnected installations and upgrades.

Previously, we were using the version in the CSV file, which worked but
it would change within the `make prepare-release` target depending on
when the command was invoked.

This commit updates the version script to use `git describe` instead,
which makes finding the current version more robust since tagging isn't
done until a subsequent step of the release process.
Copy link
Member

@yuumasato yuumasato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

The CSV file is updated to contain:

  replaces: compliance-operator.v1.4.1
  version: 1.4.2

@openshift-ci openshift-ci bot added the lgtm label May 30, 2024
Copy link

openshift-ci bot commented May 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhmdnd, yuumasato

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuumasato
Copy link
Member

/retest-required

@openshift-merge-bot openshift-merge-bot bot merged commit e4660fe into ComplianceAsCode:master May 30, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants