Skip to content

Commit

Permalink
chore: Move to semver mode update
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Jan 20, 2022
1 parent f2b9481 commit fe31bad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
11 changes: 3 additions & 8 deletions olm/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@
#

---
# Eclipse Che uses \`replaces-mode\` instead of \`semver-mode\` because we produce next versioned 9.9.9.*
# which would be seen as newer than all the stable 7.yy.z releases by semver rules, preventing anyone from updating
# from a next to a 7.yy.z release.
# See also https://operator-framework.github.io/community-operators/operator-ci-yaml/#operator-versioning

# NOTE: if you update this file, you need to submit a PR against these two files:
# https://github.com/operator-framework/community-operators/blob/master/community-operators/eclipse-che/ci.yaml
# https://github.com/operator-framework/community-operators/blob/master/upstream-community-operators/eclipse-che/ci.yaml
updateGraph: replaces-mode
# NOTE: if you update this file, you need to submit a PR against this file:
# https://github.com/redhat-openshift-ecosystem/community-operators-prod/blob/main/operators/eclipse-che/ci.yaml
updateGraph: semver-mode
addReviewers: true
reviewers:
- che-incubator-bot
Expand Down
8 changes: 2 additions & 6 deletions olm/prepare-community-operators-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,15 @@ do
echo
sed \
-e "/^ replaces: ${packageName}.v.*/d" \
-e "/^ version: ${LAST_PACKAGE_VERSION}/i\ \ replaces: eclipse-che.v${PREVIOUS_PACKAGE_VERSION}" \
-e "s/${packageName}/eclipse-che/" \
"${OPERATOR_REPO}/bundle/$channel/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml" \
> "${folderToUpdate}/${LAST_PACKAGE_VERSION}/manifests/eclipse-che.v${LAST_PACKAGE_VERSION}.clusterserviceversion.yaml"

echo " - Update the CRD files"
cp "${OPERATOR_REPO}/bundle/$channel/eclipse-che-preview-openshift/manifests/org_v1_che_crd.yaml" "${folderToUpdate}/${LAST_PACKAGE_VERSION}/manifests/checlusters.org.eclipse.che.crd.yaml"
cp "${OPERATOR_REPO}/bundle/$channel/eclipse-che-preview-openshift/manifests/org.eclipse.che_chebackupserverconfigurations_crd.yaml" "${folderToUpdate}/${LAST_PACKAGE_VERSION}/manifests/org.eclipse.che_chebackupserverconfigurations_crd.yaml"
cp "${OPERATOR_REPO}/bundle/$channel/eclipse-che-preview-openshift/manifests//org.eclipse.che_checlusterbackups_crd.yaml" "${folderToUpdate}/${LAST_PACKAGE_VERSION}/manifests/org.eclipse.che_checlusterbackups_crd.yaml"
cp "${OPERATOR_REPO}/bundle/$channel/eclipse-che-preview-openshift/manifests//org.eclipse.che_checlusterrestores_crd.yaml" "${folderToUpdate}/${LAST_PACKAGE_VERSION}/manifests/org.eclipse.che_checlusterrestores_crd.yaml"
cp "${OPERATOR_REPO}/bundle/$channel/eclipse-che-preview-openshift/manifests/org.eclipse.che_checlusterbackups_crd.yaml" "${folderToUpdate}/${LAST_PACKAGE_VERSION}/manifests/org.eclipse.che_checlusterbackups_crd.yaml"
cp "${OPERATOR_REPO}/bundle/$channel/eclipse-che-preview-openshift/manifests/org.eclipse.che_checlusterrestores_crd.yaml" "${folderToUpdate}/${LAST_PACKAGE_VERSION}/manifests/org.eclipse.che_checlusterrestores_crd.yaml"
echo

cp ${OPERATOR_REPO}/bundle/$channel/eclipse-che-preview-openshift/metadata/* "${folderToUpdate}/${LAST_PACKAGE_VERSION}/metadata"
Expand All @@ -139,9 +138,6 @@ do
-e '/operators.operatorframework.io.test.mediatype.v1: scorecard+v1/d' \
-i "${folderToUpdate}/${LAST_PACKAGE_VERSION}/metadata/annotations.yaml"

# NOTE: if you update this file, you need to submit a PR against these two files:
# https://github.com/redhat-openshift-ecosystem/community-operators-prod/blob/main/operators/eclipse-che/ci.yaml
# https://github.com/k8s-operatorhub/community-operators/blob/main/operators/eclipse-che/ci.yaml
echo " - Replace ci.yaml file"
cp ${BASE_DIR}/ci.yaml ${folderToUpdate}/ci.yaml

Expand Down
1 change: 0 additions & 1 deletion olm/release-olm-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ sed \
-e 's|"pluginRegistryImage": *"quay.io/eclipse/che-plugin-registry:next"|"pluginRegistryImage": ""|' \
-e "/^ replaces: ${packageName}.v.*/d" \
-e "s/^ version: ${lastPackageNextVersion}/ version: ${RELEASE}/" \
-e "/^ version: ${RELEASE}/i\ \ replaces: ${packageName}.v${LAST_RELEASE_VERSION}" \
-e "s/: next/: ${RELEASE}/" \
-e "s/:next/:${RELEASE}/" \
-e "s/${lastPackageNextVersion}/${RELEASE}/" \
Expand Down

0 comments on commit fe31bad

Please sign in to comment.