forked from k8ssandra/cass-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated release process for the bundles (k8ssandra#288)
* Updated release process for the bundles * Enable git checkout for commit * Fix target-directory for certified-operators * Uncomment git tag checkout and add small note to certified-operators release process to remind that the user must have access in the RH portal
- Loading branch information
Showing
5 changed files
with
110 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/sh | ||
|
||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: scripts/release-certified-bundles.sh version sha256:<sha256>" | ||
echo "Script assumes you are in the correct branch / tag and that community-operators repository" | ||
echo "has been checked out to ../community-operators/" | ||
exit | ||
fi | ||
|
||
VERSION=$1 | ||
SHA=$2 | ||
# TODO Add certified-operators-marketplace | ||
TARGET_DIRS=(certified-operators) | ||
SYSTEM_LOGGER_SHA=sha256:33e75d0c78a277cdc37be24f2b116cade0d9b7dc7249610cdf9bf0705c8a040e | ||
|
||
# Checkout tag | ||
git checkout v$VERSION | ||
|
||
yq -i '.images.system-logger = "registry.connect.redhat.com/datastax/system-logger@"' config/manager/image_config.yaml | ||
SYSTEM_LOGGER_SHA=$SYSTEM_LOGGER_SHA yq -i '.images.system-logger += env(SYSTEM_LOGGER_SHA)' config/manager/image_config.yaml | ||
|
||
# Create bundle | ||
make VERSION=$VERSION IMG=registry.connect.redhat.com/datastax/cass-operator@$SHA bundle | ||
|
||
# Add relatedImages | ||
yq -i '.spec.relatedImages = []' bundle/manifests/cass-operator.clusterserviceversion.yaml | ||
yq -i '.spec.relatedImages += {"name": "cass-operator", "image": "registry.connect.redhat.com/datastax/cass-operator@"}' bundle/manifests/cass-operator.clusterserviceversion.yaml | ||
yq -i '.spec.relatedImages += {"name": "system-logger", "image": "registry.connect.redhat.com/datastax/system-logger@"}' bundle/manifests/cass-operator.clusterserviceversion.yaml | ||
SHA=$SHA yq -i '.spec.relatedImages[0].image += env(SHA)' bundle/manifests/cass-operator.clusterserviceversion.yaml | ||
SYSTEM_LOGGER_SHA=$SYSTEM_LOGGER_SHA yq -i '.spec.relatedImages[1].image += env(SYSTEM_LOGGER_SHA)' bundle/manifests/cass-operator.clusterserviceversion.yaml | ||
|
||
for dir in "${TARGET_DIRS[@]}" | ||
do | ||
TARGET_DIR=../$dir/operators/cass-operator/v$VERSION | ||
mkdir $TARGET_DIR | ||
cp -R bundle/* $TARGET_DIR | ||
|
||
cd $TARGET_DIR | ||
git checkout -b cass-operator-$VERSION main | ||
git add . | ||
git commit -s -am "operator cass-operator (v${VERSION})" | ||
cd - | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
|
||
if [ "$#" -ne 1 ]; then | ||
echo "Usage: scripts/release-community-bundles.sh version" | ||
echo "Script assumes you are in the correct branch / tag and that community-operators repository" | ||
echo "has been checked out to ../community-operators/" | ||
exit | ||
fi | ||
|
||
VERSION=$1 | ||
TARGET_DIRS=(community-operators community-operators-prod) | ||
|
||
# Checkout tag | ||
git checkout v$VERSION | ||
|
||
# Create bundle | ||
make VERSION=$VERSION bundle | ||
|
||
# Modify package name to cass-operator-community | ||
yq eval -i '.annotations."operators.operatorframework.io.bundle.package.v1" = "cass-operator-community"' bundle/metadata/annotations.yaml | ||
|
||
for dir in "${TARGET_DIRS[@]}" | ||
do | ||
TARGET_DIR=../$dir/operators/cass-operator-community/$VERSION | ||
mkdir $TARGET_DIR | ||
cp -R bundle/* $TARGET_DIR | ||
|
||
cd $TARGET_DIR | ||
git checkout -b cass-operator-$VERSION main | ||
git add . | ||
git commit -s -am "cass-operator-community v${VERSION}" | ||
cd - | ||
done |