-
Notifications
You must be signed in to change notification settings - Fork 62
Fix release script to match latest requirements from community portals #1572
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
base: main
Are you sure you want to change the base?
Changes from all commits
3ea5f63
36c80fb
16d2e17
99f8c0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,20 +23,21 @@ function new_release { | |
|
|
||
|
|
||
| function bump_version { | ||
| echo "Bumping main.go version ..." | ||
| sed -i -E "s/(pulp-operator version:) .*/\1 ${PULP_OPERATOR_DEV_VERSION}\")/g" main.go | ||
|
|
||
| echo "Bumping Makefile operator's version ..." | ||
| sed -i -E "s/^(VERSION \?=) .*/\1 ${PULP_OPERATOR_DEV_VERSION}/g" Makefile | ||
| sed -i -E "s/^(VERSION \?=) .*/\1 ${PULP_OPERATOR_RELEASE_VERSION}/g" Makefile | ||
|
|
||
| echo "Bumping the tag used in bundle-upgrade pipeline ..." | ||
| sed -i -E "s/(ref:) ${PULP_OPERATOR_REPLACE_VERSION}/\1 ${PULP_OPERATOR_RELEASE_VERSION}/g" .github/workflows/ci.yml | ||
|
|
||
| echo "Updating the manifests with the changes ..." | ||
| make generate manifests bundle | ||
|
|
||
| echo "Updating containerImage annotation" | ||
| CSV_FILE=manifests/pulp-operator.clusterserviceversion.yaml | ||
| sed -i "s#containerImage: quay.io/pulp/pulp-operator:devel#containerImage: quay.io/pulp/pulp-operator:v${PULP_OPERATOR_RELEASE_VERSION}#g" $CSV_FILE | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no reason for CSV not to be as similar as possible between pulp-operator release, k8s community release, and openshift community release. So, this should be harmless. |
||
|
|
||
| echo "Commiting changes ..." | ||
| git commit -am "Bump version from Makefile to $PULP_OPERATOR_DEV_VERSION" -m "[noissue]" | ||
| git commit -am "Bump version from Makefile to $PULP_OPERATOR_RELEASE_VERSION" -m "[noissue]" | ||
| } | ||
|
|
||
| function stash_files { | ||
|
|
@@ -66,9 +67,11 @@ function operatorhub { | |
|
|
||
| cp -a ${PULP_OPERATOR_SOURCE_PATH}/bundle/* ${CATALOG_DIR}/ | ||
| CSV_FILE=${CATALOG_DIR}/manifests/pulp-operator.clusterserviceversion.yaml | ||
| sed -i "s#containerImage: quay.io/pulp/pulp-operator:devel#containerImage: quay.io/pulp/pulp-operator:v${PULP_OPERATOR_RELEASE_VERSION}#g" $CSV_FILE | ||
| echo " replaces: pulp-operator.v${PULP_OPERATOR_REPLACE_VERSION}" >> $CSV_FILE | ||
|
|
||
| ANNOTATIONS_FILE=${CATALOG_DIR}/metadata/annotations.yaml | ||
| echo 'com.redhat.openshift.versions: "v4.17-v4.18"' >> $ANNOTATIONS_FILE | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mimicking what was done in last three releases for https://github.com/redhat-openshift-ecosystem/community-operators-prod/pulls?q=is%3Apr+pulp-operator+is%3Aclosed
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opened #1573 to improve this situation. |
||
|
|
||
| echo "Commiting changes ..." | ||
| git add operators/pulp-operator/ | ||
| git commit -sm "operator pulp-operator ($PULP_OPERATOR_RELEASE_VERSION)" | ||
|
|
@@ -86,4 +89,4 @@ bump_version | |
| operatorhub | ||
| redhat_catalog | ||
|
|
||
| echo -e "[\e[32mOK\e[0m] All tasks finished!" | ||
| echo -e "[\e[32mOK\e[0m] All tasks finished!" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what we have been essentially doing since we went GA (1.0.0). Following YAGNI, maybe bring it back when we start doing dev builds again (like a potential 2.0 release?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap, this is one of the things I am worried about with the current release process. In the past (and also in pulpcore and plugin repositories), we worked on a
main/-devbranch which was merged to the release version/tag. When we released 1.0.0 we kind of messed with this, and I did not have time to fix it yet.So I guess, for now, we are fine with just keep releasing from the current main branch to a tag of the releasing version.