diff --git a/.github/workflows/release-next-catalog-and-operator-image.yaml b/.github/workflows/release-next-catalog-and-operator-image.yaml index aba80409d..73c9c2d46 100644 --- a/.github/workflows/release-next-catalog-and-operator-image.yaml +++ b/.github/workflows/release-next-catalog-and-operator-image.yaml @@ -78,7 +78,7 @@ jobs: registry: quay.io - name: Build catalog source run: | - ./build/scripts/release/editors-definitions.sh add-env-vars + ./build/scripts/release/editors-definitions.sh update-manager-yaml make update-dev-resources ./build/scripts/release/addDigests.sh -s $(make csv-path CHANNEL=next) -t next ./build/scripts/olm/release-catalog.sh \ diff --git a/build/scripts/release/editors-definitions.sh b/build/scripts/release/editors-definitions.sh index 75c47d7be..afd57a12e 100755 --- a/build/scripts/release/editors-definitions.sh +++ b/build/scripts/release/editors-definitions.sh @@ -37,17 +37,15 @@ usage () { echo echo "Usage:" echo -e "\t$0 release --version RELEASE_VERSION" - echo -e "\t$0 add-env-vars" + echo -e "\t$0 update-manager-yaml" } release() { if [[ ! ${VERSION} ]]; then usage; exit 1; fi - - yq -riY ".metadata.attributes.version = \"${VERSION}\"" "${EDITORS_DEFINITIONS_DIR}/che-code-latest.yaml" yq -riY "(.components[] | select(.name==\"che-code-injector\") | .container.image) = \"quay.io/che-incubator/che-code:${VERSION}\"" "${EDITORS_DEFINITIONS_DIR}/che-code-latest.yaml" } -addEnvVars() { +updateManagerYaml() { for EDITOR_DEFINITION_FILE in $(find "${EDITORS_DEFINITIONS_DIR}" -name "*.yaml"); do NAME=$(yq -r '.metadata.name' "${EDITOR_DEFINITION_FILE}") VERSION=$(yq -r '.metadata.attributes.version' "${EDITOR_DEFINITION_FILE}") @@ -74,7 +72,7 @@ init "$@" pushd "${OPERATOR_REPO}" >/dev/null case $COMMAND in 'release') release;; - 'add-env-vars') addEnvVars;; + 'update-manager-yaml'|'add-env-vars') updateManagerYaml;; *) usage; exit 1;; esac popd >/dev/null diff --git a/build/scripts/release/make-release.sh b/build/scripts/release/make-release.sh index d5258e3f7..f96ae3a15 100755 --- a/build/scripts/release/make-release.sh +++ b/build/scripts/release/make-release.sh @@ -183,10 +183,12 @@ releaseEditorsDefinitions() { echo "[INFO] Releasing editor definitions" . "${OPERATOR_REPO}/build/scripts/release/editors-definitions.sh" release --version "${RELEASE}" - . "${OPERATOR_REPO}/build/scripts/release/editors-definitions.sh" add-env-vars + . "${OPERATOR_REPO}/build/scripts/release/editors-definitions.sh" update-manager-yaml + make bundle CHANNEL=stable git add editors-definitions git add "${OPERATOR_REPO}/config/manager/manager.yaml" + git add "${OPERATOR_REPO}/bundle/stable" git commit -m "ci: Release editors definitions to $RELEASE" --signoff } diff --git a/pkg/deploy/editors-definitions/test-editors-definitions/devfile.yaml b/pkg/deploy/editors-definitions/test-editors-definitions/devfile.yaml index c2a766892..795e1b2e6 100644 --- a/pkg/deploy/editors-definitions/test-editors-definitions/devfile.yaml +++ b/pkg/deploy/editors-definitions/test-editors-definitions/devfile.yaml @@ -15,6 +15,7 @@ metadata: name: che-code attributes: version: 1.2.3 + publisher: test components: - name: component-a container: