From 0c44657e8e99a1837f9916ec199a9d0e67b637b1 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 21 May 2024 13:33:01 +0200 Subject: [PATCH 1/7] feat: Use editors definitions configmaps Signed-off-by: Anatolii Bazko --- .../scripts/buildDigestMapAlternateURLs.sh | 3 +- .../build/scripts/images.sh | 9 +- .../scripts/insert-related-images-to-csv.sh | 17 +- .../build/scripts/sync-che-olm.sh | 20 +++ .../build/scripts/sync.sh | 1 + .../che-code-insiders.yaml | 145 --------------- .../editors-definitions/che-idea-latest.yaml | 166 ------------------ .../editors-definitions/che-idea-next.yaml | 166 ------------------ .../che-idea-server-latest.yaml | 126 ------------- .../che-idea-server-next.yaml | 126 ------------- .../build/scripts/sync-che-operator.sh | 14 ++ devspaces-operator/build/scripts/sync.sh | 1 + .../che-code-insiders.yaml | 145 --------------- .../editors-definitions/che-code-latest.yaml | 143 --------------- .../editors-definitions/che-code.yaml | 34 ++-- .../editors-definitions/che-idea-next.yaml | 166 ------------------ .../che-idea-server-latest.yaml | 126 ------------- .../che-idea-server-next.yaml | 126 ------------- .../{che-idea-latest.yaml => che-idea.yaml} | 42 ++--- 19 files changed, 67 insertions(+), 1509 deletions(-) delete mode 100644 devspaces-operator-bundle/editors-definitions/che-code-insiders.yaml delete mode 100644 devspaces-operator-bundle/editors-definitions/che-idea-latest.yaml delete mode 100644 devspaces-operator-bundle/editors-definitions/che-idea-next.yaml delete mode 100644 devspaces-operator-bundle/editors-definitions/che-idea-server-latest.yaml delete mode 100644 devspaces-operator-bundle/editors-definitions/che-idea-server-next.yaml delete mode 100644 devspaces-operator/editors-definitions/che-code-insiders.yaml delete mode 100644 devspaces-operator/editors-definitions/che-code-latest.yaml rename devspaces-operator-bundle/editors-definitions/che-code-latest.yaml => devspaces-operator/editors-definitions/che-code.yaml (89%) delete mode 100644 devspaces-operator/editors-definitions/che-idea-next.yaml delete mode 100644 devspaces-operator/editors-definitions/che-idea-server-latest.yaml delete mode 100644 devspaces-operator/editors-definitions/che-idea-server-next.yaml rename devspaces-operator/editors-definitions/{che-idea-latest.yaml => che-idea.yaml} (86%) diff --git a/devspaces-operator-bundle/build/scripts/buildDigestMapAlternateURLs.sh b/devspaces-operator-bundle/build/scripts/buildDigestMapAlternateURLs.sh index 67121b96ee..adf5ea2bc1 100755 --- a/devspaces-operator-bundle/build/scripts/buildDigestMapAlternateURLs.sh +++ b/devspaces-operator-bundle/build/scripts/buildDigestMapAlternateURLs.sh @@ -14,8 +14,7 @@ tmpfile=$(mktemp) echo ${image} | sed -r \ - `# for plugin & devfile registries, use internal Brew versions` \ - -e "s|registry.redhat.io/devspaces/(pluginregistry-rhel8:.+)|registry-proxy.engineering.redhat.com/rh-osbs/devspaces-\1|g" \ + `# for devfile registry, use internal Brew versions` \ -e "s|registry.redhat.io/devspaces/(devfileregistry-rhel8:.+)|registry-proxy.engineering.redhat.com/rh-osbs/devspaces-\1|g" \ `# in all other cases (including operator) use published quay images to compute digests` \ -e "s|registry.redhat.io/devspaces/(.+)|quay.io/devspaces/\\1|g" \ diff --git a/devspaces-operator-bundle/build/scripts/images.sh b/devspaces-operator-bundle/build/scripts/images.sh index d45835fd9e..a15ac253f8 100755 --- a/devspaces-operator-bundle/build/scripts/images.sh +++ b/devspaces-operator-bundle/build/scripts/images.sh @@ -18,18 +18,11 @@ setOperatorImage() { OPERATOR_IMAGE=$(yq -r '.spec.install.spec.deployments[].spec.template.spec.containers[].image' "${CSV}") } -setPluginRegistryList() { - registry=$(yq -r '.spec.install.spec.deployments[].spec.template.spec.containers[].env[] | select(.name | test("RELATED_IMAGE_.*plugin_registry"; "g")) | .value' "${CSV}") - setRegistryImages "${registry}" - - PLUGIN_REGISTRY_LIST=${registryImages} -} - setDevfileRegistryList() { registry=$(yq -r '.spec.install.spec.deployments[].spec.template.spec.containers[].env[] | select(.name | test("RELATED_IMAGE_.*devfile_registry"; "g")) | .value' "${CSV}") setRegistryImages "${registry}" - DEVFILE_REGISTRY_LIST=${registryImages} + DEVFILE_REGISTRY_LIST=${registryImages} } setRegistryImages() { diff --git a/devspaces-operator-bundle/build/scripts/insert-related-images-to-csv.sh b/devspaces-operator-bundle/build/scripts/insert-related-images-to-csv.sh index f0562bae65..034a215971 100755 --- a/devspaces-operator-bundle/build/scripts/insert-related-images-to-csv.sh +++ b/devspaces-operator-bundle/build/scripts/insert-related-images-to-csv.sh @@ -10,7 +10,7 @@ # Contributors: # Red Hat, Inc. - initial API and implementation # -# insert RELATED_IMAGE_ fields for images referenced by the plugin and devfile registries +# insert RELATED_IMAGE_ fields for images referenced by the devfile registry set -e # SCRIPTS_DIR=$(cd "$(dirname "$0")"; pwd) @@ -51,13 +51,11 @@ if [[ ! -x $PODMAN ]]; then fi fi -PLUGIN_REGISTRY_CONTAINERS="" DEVFILE_REGISTRY_CONTAINERS="" tmpdir=$(mktemp -d); mkdir -p $tmpdir; pushd $tmpdir >/dev/null # extract registry containers to get external_images.txt curl -sSLO https://raw.githubusercontent.com/redhat-developer/devspaces/devspaces-3-rhel-8/product/containerExtract.sh && chmod +x containerExtract.sh ./containerExtract.sh quay.io/devspaces/devfileregistry-rhel8:${DS_VERSION} --tar-flags var/www/html/*/external_images.txt --delete-before & - ./containerExtract.sh quay.io/devspaces/pluginregistry-rhel8:${DS_VERSION} --tar-flags var/www/html/*/external_images.txt --delete-before & wait # CRW-3432 fail if we can't find the external_images.txt files @@ -65,14 +63,10 @@ tmpdir=$(mktemp -d); mkdir -p $tmpdir; pushd $tmpdir >/dev/null echo "[ERROR] Cannot resolve devfileregistry external_images.txt!" exit 2 fi - if [[ ! $(cat /tmp/quay.io-devspaces-pluginregistry-rhel8-${DS_VERSION}*/var/www/html/*/external_images.txt) ]]; then - echo "[ERROR] Cannot resolve pluginregistry external_images.txt!" - exit 3 - fi # CRW-3177, CRW-3178 sort uniquely; replace quay refs with RHEC refs # remove ghcr.io/ansible/ansible-workspace-env-reference from EXTERNAL_IMAGES - EXTERNAL_IMAGES=$(cat /tmp/quay.io-devspaces-{devfile,plugin}registry-rhel8-${DS_VERSION}*/var/www/html/*/external_images.txt | \ + EXTERNAL_IMAGES=$(cat /tmp/quay.io-devspaces-devfileregistry-rhel8-${DS_VERSION}*/var/www/html/*/external_images.txt | \ sed -r -e '/^ghcr\.io\/ansible\/ansible-workspace-env-reference/d' \ -e "s#quay.io/devspaces/#registry.redhat.io/devspaces/#g" | sort -uV) @@ -82,11 +76,10 @@ tmpdir=$(mktemp -d); mkdir -p $tmpdir; pushd $tmpdir >/dev/null echo "${EXTERNAL_IMAGES[@]}" popd >/dev/null # cleanup -rm -fr $tmpdir /tmp/quay.io-devspaces-{devfile,plugin}registry-rhel8-${DS_VERSION}*/ -$PODMAN rmi -f quay.io/devspaces/pluginregistry-rhel8:${DS_VERSION} quay.io/devspaces/devfileregistry-rhel8:${DS_VERSION} || true +rm -fr $tmpdir /tmp/quay.io-devspaces-devfileregistry-rhel8-${DS_VERSION}*/ +$PODMAN rmi -f quay.io/devspaces/devfileregistry-rhel8:${DS_VERSION} || true # convert strings to arrays DEVFILE_REGISTRY_CONTAINERS=(${EXTERNAL_IMAGES}) -PLUGIN_REGISTRY_CONTAINERS=(${EXTERNAL_IMAGES}) # same method used in both insert-related-images-to-csv.sh and sync-che-olm.sh insertEnvVar() @@ -100,7 +93,6 @@ insertEnvVar() CSVFILE=${TARGETDIR}/manifests/devspaces.csv.yaml # The updated name should be like: -# RELATED_IMAGE_devspaces_udi_plugin_registry_image_GIXDCMQK # RELATED_IMAGE_devspaces_udi_devfile_registry_image_GIXDCMQK # RELATED_IMAGE_jboss_eap_7_eap73_openjdk8_openshift_rhel7_devfile_registry_image_G4XDGLRWBI______ updateRelatedImageName() { @@ -121,7 +113,6 @@ updateRelatedImageName() { done } -updateRelatedImageName "plugin_registry_image" "${PLUGIN_REGISTRY_CONTAINERS[@]}" updateRelatedImageName "devfile_registry_image" "${DEVFILE_REGISTRY_CONTAINERS[@]}" # replace external devspaces refs with internal ones, and quay refs (from v2 devfiles) with RHEC ones diff --git a/devspaces-operator-bundle/build/scripts/sync-che-olm.sh b/devspaces-operator-bundle/build/scripts/sync-che-olm.sh index b91885a96e..0aca61a702 100755 --- a/devspaces-operator-bundle/build/scripts/sync-che-olm.sh +++ b/devspaces-operator-bundle/build/scripts/sync-che-olm.sh @@ -96,6 +96,20 @@ UDI_IMAGE="registry.redhat.io/devspaces/udi-rhel8@${UDI_IMAGE_TAG}" RBAC_PROXY_IMAGE="registry.redhat.io/openshift4/ose-kube-rbac-proxy:${OPENSHIFT_TAG}" OAUTH_PROXY_IMAGE="registry.redhat.io/openshift4/ose-oauth-proxy:${OPENSHIFT_TAG}" +CODE_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://registry.redhat.io/devspaces/code-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep -v "source" | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) +CODE_IMAGE_DIGEST=$(skopeo inspect docker://registry.redhat.io/devspaces/code-rhel8:${CODE_IMAGE_VERSION_ZZZ} | yq -r '.Digest') +CODE_IMAGE="registry.redhat.io/devspaces/code-rhel8@${CODE_IMAGE_DIGEST}" +IDEA_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://registry.redhat.io/devspaces/idea-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) +IDEA_IMAGE_DIGEST=$(skopeo inspect docker://registry.redhat.io/devspaces/idea-rhel8:${IDEA_IMAGE_VERSION_ZZZ} | yq -r '.Digest') +IDEA_IMAGE="registry.redhat.io/devspaces/idea-rhel8@${IDEA_IMAGE_DIGEST}" + +EDITORS_DEFINITIONS_ENV_VAR="[ +{ name: \"RELATED_IMAGE_editor_definition_che_idea_2022_1_idea_rhel8\", value: \"${UDI_IMAGE}\"}, +{ name: \"RELATED_IMAGE_editor_definition_che_idea_2022_1_idea_rhel8_injector\", value: \"${IDEA_IMAGE}\"}, +{ name: \"RELATED_IMAGE_editor_definition_che_code_latest_che_code_runtime_description\", value: \"${UDI_IMAGE}\"}, +{ name: \"RELATED_IMAGE_editor_definition_che_code_latest_che_code_injector\", value: \"${CODE_IMAGE}\"} +]" + # header to reattach to yaml files after yq transform removes it COPYRIGHT="# # Copyright (c) 2018-$(date +%Y) Red Hat, Inc. @@ -362,6 +376,12 @@ for CSVFILE in ${TARGETDIR}/manifests/devspaces.csv.yaml; do done echo "Converted (yq #3) ${CSVFILE}" + # https://github.com/eclipse-che/che/issues/22932 + # Update editors definitions environment variables in csv + yq -riY "del(.spec.install.spec.deployments[].spec.template.spec.containers[0].env[] | select(.name | test(\"^RELATED_IMAGE_editor_definition_\")))" "${CSVFILE}" + yq -riY "(.spec.install.spec.deployments[].spec.template.spec.containers[0].env ) += [${EDITORS_DEFINITIONS_ENV_VAR}]" "${CSVFILE}" + echo "Converted (yq #3) ${CSVFILE}" + # add more RELATED_IMAGE_ fields for the images referenced by the registries bash -e "${SCRIPTS_DIR}/insert-related-images-to-csv.sh" -v "${CSV_VERSION}" -t "${TARGETDIR}" --ds-branch "${MIDSTM_BRANCH}" RETURN_CODE=$? diff --git a/devspaces-operator-bundle/build/scripts/sync.sh b/devspaces-operator-bundle/build/scripts/sync.sh index 0ae95bdc5d..1e207790b6 100755 --- a/devspaces-operator-bundle/build/scripts/sync.sh +++ b/devspaces-operator-bundle/build/scripts/sync.sh @@ -118,6 +118,7 @@ api/ build/ config/ controllers/ +editors-definitions/ Dependencies.md devfile.yaml devfiles.yaml diff --git a/devspaces-operator-bundle/editors-definitions/che-code-insiders.yaml b/devspaces-operator-bundle/editors-definitions/che-code-insiders.yaml deleted file mode 100644 index 9ce0b1b6fb..0000000000 --- a/devspaces-operator-bundle/editors-definitions/che-code-insiders.yaml +++ /dev/null @@ -1,145 +0,0 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -schemaVersion: 2.2.2 -metadata: - name: che-code - displayName: VS Code - Open Source - description: Microsoft Visual Studio Code - Open Source IDE for Eclipse Che - Insiders - build - tags: - - Tech-Preview - attributes: - publisher: che-incubator - version: insiders - title: Microsoft Visual Studio Code - Open Source IDE for Eclipse Che - Insiders - build - repository: https://github.com/che-incubator/che-code - firstPublicationDate: '2021-10-31' - iconMediatype: image/svg+xml - iconData: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -commands: - - id: init-container-command - apply: - component: che-code-injector - - id: init-che-code-command - exec: - component: che-code-runtime-description - commandLine: nohup /checode/entrypoint-volume.sh > /checode/entrypoint-logs.txt - 2>&1 & -events: - preStart: - - init-container-command - postStart: - - init-che-code-command -components: - - name: che-code-injector - container: - image: quay.io/che-incubator/che-code:insiders - command: - - /entrypoint-init-container.sh - volumeMounts: - - name: checode - path: /checode - memoryLimit: 256Mi - memoryRequest: 32Mi - cpuLimit: 500m - cpuRequest: 30m - - name: che-code-runtime-description - container: - image: quay.io/devfile/universal-developer-image:latest - memoryLimit: 1024Mi - memoryRequest: 256Mi - cpuLimit: 500m - cpuRequest: 30m - volumeMounts: - - name: checode - path: /checode - endpoints: - - name: che-code - attributes: - type: main - cookiesAuthEnabled: true - discoverable: false - urlRewriteSupported: true - targetPort: 3100 - exposure: public - secure: true - protocol: https - - name: code-redirect-1 - targetPort: 13131 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: code-redirect-2 - targetPort: 13132 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: code-redirect-3 - targetPort: 13133 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - attributes: - app.kubernetes.io/component: che-code-runtime - app.kubernetes.io/part-of: che-code.eclipse.org - controller.devfile.io/container-contribution: true - - name: checode - volume: {} \ No newline at end of file diff --git a/devspaces-operator-bundle/editors-definitions/che-idea-latest.yaml b/devspaces-operator-bundle/editors-definitions/che-idea-latest.yaml deleted file mode 100644 index 9846a7d386..0000000000 --- a/devspaces-operator-bundle/editors-definitions/che-idea-latest.yaml +++ /dev/null @@ -1,166 +0,0 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -schemaVersion: 2.2.2 -metadata: - name: che-idea - displayName: IntelliJ IDEA Community - description: JetBrains IntelliJ IDEA Community IDE for Eclipse Che - tags: - - Tech-Preview - attributes: - publisher: che-incubator - version: latest - title: JetBrains IntelliJ IDEA Community IDE for Eclipse Che - repository: https://github.com/che-incubator/jetbrains-editor-images - firstPublicationDate: '2022-01-11' - iconMediatype: image/svg+xml - iconData: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -commands: - - id: init-container-command - apply: - component: che-idea-injector - - id: init-che-idea-command - exec: - component: che-idea-runtime-description - commandLine: nohup /projector/entrypoint-volume.sh > /projector/entrypoint-logs.txt - 2>&1 & -events: - preStart: - - init-container-command - postStart: - - init-che-idea-command -components: - - name: che-idea-runtime-description - container: - image: quay.io/devfile/universal-developer-image:latest - env: - - name: PROJECTOR_ASSEMBLY_DIR - value: /projector - - name: PROJECTOR_CONFIG_DIR - value: /home/user/.jetbrains - volumeMounts: - - name: projector-volume - path: /projector - - name: projector-configuration - path: /home/user/.jetbrains - - name: projector-java-configuration - path: /home/user/.java - memoryLimit: 6144Mi - memoryRequest: 2048Mi - cpuLimit: 2000m - cpuRequest: 1500m - endpoints: - - name: intellij - attributes: - type: main - cookiesAuthEnabled: true - discoverable: false - urlRewriteSupported: true - targetPort: 8887 - exposure: public - path: /?backgroundColor=434343&wss - secure: true - protocol: https - - name: intellij-redirect-1 - targetPort: 13131 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: intellij-redirect-2 - targetPort: 13132 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: intellij-redirect-3 - targetPort: 13133 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - attributes: - app.kubernetes.io/component: che-idea-runtime - app.kubernetes.io/part-of: che-idea.eclipse.org - controller.devfile.io/container-contribution: true - - name: projector-volume - volume: {} - - name: projector-configuration - volume: {} - - name: projector-java-configuration - volume: {} - - name: che-idea-injector - container: - image: quay.io/che-incubator/che-idea:latest - command: - - /projector/entrypoint-init-container.sh - env: - - name: PROJECTOR_VOLUME_MOUNT - value: /projector-volume - - name: PROJECTOR_ASSEMBLY_DIR - value: /projector - volumeMounts: - - name: projector-volume - path: /projector-volume - memoryLimit: 128Mi - memoryRequest: 32Mi - cpuLimit: 500m - cpuRequest: 30m \ No newline at end of file diff --git a/devspaces-operator-bundle/editors-definitions/che-idea-next.yaml b/devspaces-operator-bundle/editors-definitions/che-idea-next.yaml deleted file mode 100644 index 7d662a09f9..0000000000 --- a/devspaces-operator-bundle/editors-definitions/che-idea-next.yaml +++ /dev/null @@ -1,166 +0,0 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -schemaVersion: 2.2.2 -metadata: - name: che-idea - displayName: IntelliJ IDEA Community - description: JetBrains IntelliJ IDEA Community IDE for Eclipse Che - next - tags: - - Tech-Preview - attributes: - publisher: che-incubator - version: next - title: JetBrains IntelliJ IDEA Community IDE for Eclipse Che - next - repository: https://github.com/che-incubator/jetbrains-editor-images - firstPublicationDate: '2022-01-11' - iconMediatype: image/svg+xml - iconData: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -commands: - - id: init-container-command - apply: - component: che-idea-injector - - id: init-che-idea-command - exec: - component: che-idea-runtime-description - commandLine: nohup /projector/entrypoint-volume.sh > /projector/entrypoint-logs.txt - 2>&1 & -events: - preStart: - - init-container-command - postStart: - - init-che-idea-command -components: - - name: che-idea-runtime-description - container: - image: quay.io/devfile/universal-developer-image:latest - env: - - name: PROJECTOR_ASSEMBLY_DIR - value: /projector - - name: PROJECTOR_CONFIG_DIR - value: /home/user/.jetbrains - volumeMounts: - - name: projector-volume - path: /projector - - name: projector-configuration - path: /home/user/.jetbrains - - name: projector-java-configuration - path: /home/user/.java - memoryLimit: 6144Mi - memoryRequest: 2048Mi - cpuLimit: 2000m - cpuRequest: 1500m - endpoints: - - name: intellij - attributes: - type: main - cookiesAuthEnabled: true - discoverable: false - urlRewriteSupported: true - targetPort: 8887 - exposure: public - path: /?backgroundColor=434343&wss - secure: true - protocol: https - - name: intellij-redirect-1 - targetPort: 13131 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: intellij-redirect-2 - targetPort: 13132 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: intellij-redirect-3 - targetPort: 13133 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - attributes: - app.kubernetes.io/component: che-idea-runtime - app.kubernetes.io/part-of: che-idea.eclipse.org - controller.devfile.io/container-contribution: true - - name: projector-volume - volume: {} - - name: projector-configuration - volume: {} - - name: projector-java-configuration - volume: {} - - name: che-idea-injector - container: - image: quay.io/che-incubator/che-idea:next - command: - - /projector/entrypoint-init-container.sh - env: - - name: PROJECTOR_VOLUME_MOUNT - value: /projector-volume - - name: PROJECTOR_ASSEMBLY_DIR - value: /projector - volumeMounts: - - name: projector-volume - path: /projector-volume - memoryLimit: 128Mi - memoryRequest: 32Mi - cpuLimit: 500m - cpuRequest: 30m \ No newline at end of file diff --git a/devspaces-operator-bundle/editors-definitions/che-idea-server-latest.yaml b/devspaces-operator-bundle/editors-definitions/che-idea-server-latest.yaml deleted file mode 100644 index ebb57d670f..0000000000 --- a/devspaces-operator-bundle/editors-definitions/che-idea-server-latest.yaml +++ /dev/null @@ -1,126 +0,0 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -schemaVersion: 2.2.2 -metadata: - name: che-idea-server - displayName: IntelliJ IDEA Ultimate (desktop) - description: JetBrains IntelliJ IDEA Ultimate dev server for Eclipse Che - latest - tags: - - Tech-Preview - attributes: - publisher: che-incubator - version: latest - title: JetBrains IntelliJ IDEA Ultimate dev server for Eclipse Che - latest - repository: https://github.com/che-incubator/che-idea-dev-server - firstPublicationDate: '2023-30-11' - iconMediatype: image/svg+xml - iconData: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -commands: - - id: inject-editor - apply: - component: editor-injector - - id: start-idea-server - exec: - component: editor-runtime - commandLine: nohup /idea-server/entrypoint-volume.sh > /idea-server/std.out - 2>&1 & -events: - preStart: - - inject-editor - postStart: - - start-idea-server -components: - - name: idea-server - volume: {} - - name: editor-injector - container: - image: quay.io/che-incubator/che-idea-dev-server:latest - command: - - /entrypoint-init-container.sh - volumeMounts: - - name: idea-server - path: /idea-server - memoryLimit: 256Mi - memoryRequest: 32Mi - cpuLimit: 500m - cpuRequest: 30m - - name: editor-runtime - container: - image: quay.io/devfile/universal-developer-image:latest - memoryLimit: 6144Mi - memoryRequest: 2048Mi - cpuLimit: 2000m - cpuRequest: 1500m - volumeMounts: - - name: idea-server - path: /idea-server - endpoints: - - name: idea-server - attributes: - type: main - cookiesAuthEnabled: true - discoverable: false - urlRewriteSupported: true - targetPort: 3400 - exposure: public - secure: true - protocol: https - attributes: - app.kubernetes.io/component: editor-runtime - app.kubernetes.io/part-of: idea-server.eclipse.org - controller.devfile.io/container-contribution: true \ No newline at end of file diff --git a/devspaces-operator-bundle/editors-definitions/che-idea-server-next.yaml b/devspaces-operator-bundle/editors-definitions/che-idea-server-next.yaml deleted file mode 100644 index 87faca609a..0000000000 --- a/devspaces-operator-bundle/editors-definitions/che-idea-server-next.yaml +++ /dev/null @@ -1,126 +0,0 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -schemaVersion: 2.2.2 -metadata: - name: che-idea-server - displayName: IntelliJ IDEA Ultimate (desktop) - description: JetBrains IntelliJ IDEA Ultimate dev server for Eclipse Che - next - tags: - - Tech-Preview - attributes: - publisher: che-incubator - version: next - title: JetBrains IntelliJ IDEA Ultimate dev server for Eclipse Che - next - repository: https://github.com/che-incubator/che-idea-dev-server - firstPublicationDate: '2023-30-11' - iconMediatype: image/svg+xml - iconData: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -commands: - - id: inject-editor - apply: - component: editor-injector - - id: start-idea-server - exec: - component: editor-runtime - commandLine: nohup /idea-server/entrypoint-volume.sh > /idea-server/std.out - 2>&1 & -events: - preStart: - - inject-editor - postStart: - - start-idea-server -components: - - name: idea-server - volume: {} - - name: editor-injector - container: - image: quay.io/che-incubator/che-idea-dev-server:next - command: - - /entrypoint-init-container.sh - volumeMounts: - - name: idea-server - path: /idea-server - memoryLimit: 256Mi - memoryRequest: 32Mi - cpuLimit: 500m - cpuRequest: 30m - - name: editor-runtime - container: - image: quay.io/devfile/universal-developer-image:latest - memoryLimit: 6144Mi - memoryRequest: 2048Mi - cpuLimit: 2000m - cpuRequest: 1500m - volumeMounts: - - name: idea-server - path: /idea-server - endpoints: - - name: idea-server - attributes: - type: main - cookiesAuthEnabled: true - discoverable: false - urlRewriteSupported: true - targetPort: 3400 - exposure: public - secure: true - protocol: https - attributes: - app.kubernetes.io/component: editor-runtime - app.kubernetes.io/part-of: idea-server.eclipse.org - controller.devfile.io/container-contribution: true \ No newline at end of file diff --git a/devspaces-operator/build/scripts/sync-che-operator.sh b/devspaces-operator/build/scripts/sync-che-operator.sh index 1b923d2b93..78bcc84794 100755 --- a/devspaces-operator/build/scripts/sync-che-operator.sh +++ b/devspaces-operator/build/scripts/sync-che-operator.sh @@ -68,6 +68,13 @@ UDI_IMAGE="registry.redhat.io/devspaces/udi-rhel8@${UDI_IMAGE_TAG}" RBAC_PROXY_IMAGE="registry.redhat.io/openshift4/ose-kube-rbac-proxy:${OPENSHIFT_TAG}" OAUTH_PROXY_IMAGE="registry.redhat.io/openshift4/ose-oauth-proxy:${OPENSHIFT_TAG}" +CODE_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://registry.redhat.io/devspaces/code-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep -v "source" | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) +CODE_IMAGE_DIGEST=$(skopeo inspect docker://registry.redhat.io/devspaces/code-rhel8:${CODE_IMAGE_VERSION_ZZZ} | yq -r '.Digest') +CODE_IMAGE="registry.redhat.io/devspaces/code-rhel8@${CODE_IMAGE_DIGEST}" +IDEA_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://registry.redhat.io/devspaces/idea-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) +IDEA_IMAGE_DIGEST=$(skopeo inspect docker://registry.redhat.io/devspaces/idea-rhel8:${IDEA_IMAGE_VERSION_ZZZ} | yq -r '.Digest') +IDEA_IMAGE="registry.redhat.io/devspaces/idea-rhel8@${IDEA_IMAGE_DIGEST}" + # global / generic changes pushd "${SOURCEDIR}" >/dev/null COPY_FOLDERS="api bundle config controllers hack pkg vendor version" @@ -250,6 +257,13 @@ if [[ $oldImage ]]; then fi echo "Converted (yq #2) ${OPERATOR_DEPLOYMENT_YAML}" +# https://github.com/eclipse-che/che/issues/22932 +# Updating manager.yaml is not required, see `sync-che-olm.sh` +yq -riY "(.components[] | select(.name==\"che-code-injector\") | .container.image)=\"${CODE_IMAGE}\"" "${TARGETDIR}/editors-definitions/che-code.yaml" +yq -riY "(.components[] | select(.name==\"che-code-runtime-description\") | .container.image)=\"${UBI_IMAGE}\"" "${TARGETDIR}/editors-definitions/che-code.yaml" +yq -riY "(.components[] | select(.name==\"idea-rhel8-injector\") | .container.image)=\"${IDEA_IMAGE}\"" "${TARGETDIR}/editors-definitions/che-idea.yaml" +yq -riY "(.components[] | select(.name==\"idea-rhel8\") | .container.image)=\"${UBI_IMAGE}\"" "${TARGETDIR}/editors-definitions/che-idea.yaml" + # if sort the file, we'll lose all the comments yq -yY '.spec.template.spec.containers[0].env |= sort_by(.name)' "${TARGETDIR}/${OPERATOR_DEPLOYMENT_YAML}" > "${TARGETDIR}/${OPERATOR_DEPLOYMENT_YAML}2" echo "${COPYRIGHT}$(cat "${TARGETDIR}/${OPERATOR_DEPLOYMENT_YAML}2")" > "${TARGETDIR}/${OPERATOR_DEPLOYMENT_YAML}" diff --git a/devspaces-operator/build/scripts/sync.sh b/devspaces-operator/build/scripts/sync.sh index f8d9c48d24..a68ccab1da 100755 --- a/devspaces-operator/build/scripts/sync.sh +++ b/devspaces-operator/build/scripts/sync.sh @@ -61,6 +61,7 @@ echo ".github/ .ci/ .vscode/ build/ +editors-definitions/ devfiles.yaml /container.yaml /content_sets.* diff --git a/devspaces-operator/editors-definitions/che-code-insiders.yaml b/devspaces-operator/editors-definitions/che-code-insiders.yaml deleted file mode 100644 index 9ce0b1b6fb..0000000000 --- a/devspaces-operator/editors-definitions/che-code-insiders.yaml +++ /dev/null @@ -1,145 +0,0 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -schemaVersion: 2.2.2 -metadata: - name: che-code - displayName: VS Code - Open Source - description: Microsoft Visual Studio Code - Open Source IDE for Eclipse Che - Insiders - build - tags: - - Tech-Preview - attributes: - publisher: che-incubator - version: insiders - title: Microsoft Visual Studio Code - Open Source IDE for Eclipse Che - Insiders - build - repository: https://github.com/che-incubator/che-code - firstPublicationDate: '2021-10-31' - iconMediatype: image/svg+xml - iconData: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -commands: - - id: init-container-command - apply: - component: che-code-injector - - id: init-che-code-command - exec: - component: che-code-runtime-description - commandLine: nohup /checode/entrypoint-volume.sh > /checode/entrypoint-logs.txt - 2>&1 & -events: - preStart: - - init-container-command - postStart: - - init-che-code-command -components: - - name: che-code-injector - container: - image: quay.io/che-incubator/che-code:insiders - command: - - /entrypoint-init-container.sh - volumeMounts: - - name: checode - path: /checode - memoryLimit: 256Mi - memoryRequest: 32Mi - cpuLimit: 500m - cpuRequest: 30m - - name: che-code-runtime-description - container: - image: quay.io/devfile/universal-developer-image:latest - memoryLimit: 1024Mi - memoryRequest: 256Mi - cpuLimit: 500m - cpuRequest: 30m - volumeMounts: - - name: checode - path: /checode - endpoints: - - name: che-code - attributes: - type: main - cookiesAuthEnabled: true - discoverable: false - urlRewriteSupported: true - targetPort: 3100 - exposure: public - secure: true - protocol: https - - name: code-redirect-1 - targetPort: 13131 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: code-redirect-2 - targetPort: 13132 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: code-redirect-3 - targetPort: 13133 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - attributes: - app.kubernetes.io/component: che-code-runtime - app.kubernetes.io/part-of: che-code.eclipse.org - controller.devfile.io/container-contribution: true - - name: checode - volume: {} \ No newline at end of file diff --git a/devspaces-operator/editors-definitions/che-code-latest.yaml b/devspaces-operator/editors-definitions/che-code-latest.yaml deleted file mode 100644 index c65c409516..0000000000 --- a/devspaces-operator/editors-definitions/che-code-latest.yaml +++ /dev/null @@ -1,143 +0,0 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -schemaVersion: 2.2.2 -metadata: - name: che-code - displayName: VS Code - Open Source - description: Microsoft Visual Studio Code - Open Source IDE for Eclipse Che - attributes: - publisher: che-incubator - version: latest - title: Microsoft Visual Studio Code - Open Source IDE for Eclipse Che - repository: https://github.com/che-incubator/che-code - firstPublicationDate: '2021-10-31' - iconMediatype: image/svg+xml - iconData: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -commands: - - id: init-container-command - apply: - component: che-code-injector - - id: init-che-code-command - exec: - component: che-code-runtime-description - commandLine: nohup /checode/entrypoint-volume.sh > /checode/entrypoint-logs.txt - 2>&1 & -events: - preStart: - - init-container-command - postStart: - - init-che-code-command -components: - - name: che-code-injector - container: - image: quay.io/che-incubator/che-code:latest - command: - - /entrypoint-init-container.sh - volumeMounts: - - name: checode - path: /checode - memoryLimit: 256Mi - memoryRequest: 32Mi - cpuLimit: 500m - cpuRequest: 30m - - name: che-code-runtime-description - container: - image: quay.io/devfile/universal-developer-image:latest - memoryLimit: 1024Mi - memoryRequest: 256Mi - cpuLimit: 500m - cpuRequest: 30m - volumeMounts: - - name: checode - path: /checode - endpoints: - - name: che-code - attributes: - type: main - cookiesAuthEnabled: true - discoverable: false - urlRewriteSupported: true - targetPort: 3100 - exposure: public - secure: true - protocol: https - - name: code-redirect-1 - targetPort: 13131 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: code-redirect-2 - targetPort: 13132 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: code-redirect-3 - targetPort: 13133 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - attributes: - app.kubernetes.io/component: che-code-runtime - app.kubernetes.io/part-of: che-code.eclipse.org - controller.devfile.io/container-contribution: true - - name: checode - volume: {} -attributes: - version: null diff --git a/devspaces-operator-bundle/editors-definitions/che-code-latest.yaml b/devspaces-operator/editors-definitions/che-code.yaml similarity index 89% rename from devspaces-operator-bundle/editors-definitions/che-code-latest.yaml rename to devspaces-operator/editors-definitions/che-code.yaml index c65c409516..66ad23cfc1 100644 --- a/devspaces-operator-bundle/editors-definitions/che-code-latest.yaml +++ b/devspaces-operator/editors-definitions/che-code.yaml @@ -1,28 +1,17 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - schemaVersion: 2.2.2 metadata: name: che-code displayName: VS Code - Open Source - description: Microsoft Visual Studio Code - Open Source IDE for Eclipse Che + description: Red Hat OpenShift Dev Spaces with Microsoft Visual Studio Code - Open Source IDE attributes: publisher: che-incubator version: latest - title: Microsoft Visual Studio Code - Open Source IDE for Eclipse Che + title: Red Hat OpenShift Dev Spaces with Microsoft Visual Studio Code - Open Source IDE repository: https://github.com/che-incubator/che-code - firstPublicationDate: '2021-10-31' - iconMediatype: image/svg+xml - iconData: | + firstPublicationDate: '2022-07-19' + skipMetaYaml: true + icon-mediatype: image/svg+xml + icon-data: | @@ -71,8 +60,7 @@ commands: - id: init-che-code-command exec: component: che-code-runtime-description - commandLine: nohup /checode/entrypoint-volume.sh > /checode/entrypoint-logs.txt - 2>&1 & + commandLine: nohup /checode/entrypoint-volume.sh > /checode/entrypoint-logs.txt 2>&1 & events: preStart: - init-container-command @@ -81,7 +69,7 @@ events: components: - name: che-code-injector container: - image: quay.io/che-incubator/che-code:latest + image: registry.redhat.io/devspaces/code-rhel8:latest command: - /entrypoint-init-container.sh volumeMounts: @@ -93,7 +81,7 @@ components: cpuRequest: 30m - name: che-code-runtime-description container: - image: quay.io/devfile/universal-developer-image:latest + image: registry.redhat.io/devspaces/udi-rhel8:latest memoryLimit: 1024Mi memoryRequest: 256Mi cpuLimit: 500m @@ -138,6 +126,4 @@ components: app.kubernetes.io/part-of: che-code.eclipse.org controller.devfile.io/container-contribution: true - name: checode - volume: {} -attributes: - version: null + volume: {} \ No newline at end of file diff --git a/devspaces-operator/editors-definitions/che-idea-next.yaml b/devspaces-operator/editors-definitions/che-idea-next.yaml deleted file mode 100644 index 7d662a09f9..0000000000 --- a/devspaces-operator/editors-definitions/che-idea-next.yaml +++ /dev/null @@ -1,166 +0,0 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -schemaVersion: 2.2.2 -metadata: - name: che-idea - displayName: IntelliJ IDEA Community - description: JetBrains IntelliJ IDEA Community IDE for Eclipse Che - next - tags: - - Tech-Preview - attributes: - publisher: che-incubator - version: next - title: JetBrains IntelliJ IDEA Community IDE for Eclipse Che - next - repository: https://github.com/che-incubator/jetbrains-editor-images - firstPublicationDate: '2022-01-11' - iconMediatype: image/svg+xml - iconData: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -commands: - - id: init-container-command - apply: - component: che-idea-injector - - id: init-che-idea-command - exec: - component: che-idea-runtime-description - commandLine: nohup /projector/entrypoint-volume.sh > /projector/entrypoint-logs.txt - 2>&1 & -events: - preStart: - - init-container-command - postStart: - - init-che-idea-command -components: - - name: che-idea-runtime-description - container: - image: quay.io/devfile/universal-developer-image:latest - env: - - name: PROJECTOR_ASSEMBLY_DIR - value: /projector - - name: PROJECTOR_CONFIG_DIR - value: /home/user/.jetbrains - volumeMounts: - - name: projector-volume - path: /projector - - name: projector-configuration - path: /home/user/.jetbrains - - name: projector-java-configuration - path: /home/user/.java - memoryLimit: 6144Mi - memoryRequest: 2048Mi - cpuLimit: 2000m - cpuRequest: 1500m - endpoints: - - name: intellij - attributes: - type: main - cookiesAuthEnabled: true - discoverable: false - urlRewriteSupported: true - targetPort: 8887 - exposure: public - path: /?backgroundColor=434343&wss - secure: true - protocol: https - - name: intellij-redirect-1 - targetPort: 13131 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: intellij-redirect-2 - targetPort: 13132 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - - name: intellij-redirect-3 - targetPort: 13133 - exposure: public - protocol: https - attributes: - discoverable: false - urlRewriteSupported: false - attributes: - app.kubernetes.io/component: che-idea-runtime - app.kubernetes.io/part-of: che-idea.eclipse.org - controller.devfile.io/container-contribution: true - - name: projector-volume - volume: {} - - name: projector-configuration - volume: {} - - name: projector-java-configuration - volume: {} - - name: che-idea-injector - container: - image: quay.io/che-incubator/che-idea:next - command: - - /projector/entrypoint-init-container.sh - env: - - name: PROJECTOR_VOLUME_MOUNT - value: /projector-volume - - name: PROJECTOR_ASSEMBLY_DIR - value: /projector - volumeMounts: - - name: projector-volume - path: /projector-volume - memoryLimit: 128Mi - memoryRequest: 32Mi - cpuLimit: 500m - cpuRequest: 30m \ No newline at end of file diff --git a/devspaces-operator/editors-definitions/che-idea-server-latest.yaml b/devspaces-operator/editors-definitions/che-idea-server-latest.yaml deleted file mode 100644 index ebb57d670f..0000000000 --- a/devspaces-operator/editors-definitions/che-idea-server-latest.yaml +++ /dev/null @@ -1,126 +0,0 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -schemaVersion: 2.2.2 -metadata: - name: che-idea-server - displayName: IntelliJ IDEA Ultimate (desktop) - description: JetBrains IntelliJ IDEA Ultimate dev server for Eclipse Che - latest - tags: - - Tech-Preview - attributes: - publisher: che-incubator - version: latest - title: JetBrains IntelliJ IDEA Ultimate dev server for Eclipse Che - latest - repository: https://github.com/che-incubator/che-idea-dev-server - firstPublicationDate: '2023-30-11' - iconMediatype: image/svg+xml - iconData: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -commands: - - id: inject-editor - apply: - component: editor-injector - - id: start-idea-server - exec: - component: editor-runtime - commandLine: nohup /idea-server/entrypoint-volume.sh > /idea-server/std.out - 2>&1 & -events: - preStart: - - inject-editor - postStart: - - start-idea-server -components: - - name: idea-server - volume: {} - - name: editor-injector - container: - image: quay.io/che-incubator/che-idea-dev-server:latest - command: - - /entrypoint-init-container.sh - volumeMounts: - - name: idea-server - path: /idea-server - memoryLimit: 256Mi - memoryRequest: 32Mi - cpuLimit: 500m - cpuRequest: 30m - - name: editor-runtime - container: - image: quay.io/devfile/universal-developer-image:latest - memoryLimit: 6144Mi - memoryRequest: 2048Mi - cpuLimit: 2000m - cpuRequest: 1500m - volumeMounts: - - name: idea-server - path: /idea-server - endpoints: - - name: idea-server - attributes: - type: main - cookiesAuthEnabled: true - discoverable: false - urlRewriteSupported: true - targetPort: 3400 - exposure: public - secure: true - protocol: https - attributes: - app.kubernetes.io/component: editor-runtime - app.kubernetes.io/part-of: idea-server.eclipse.org - controller.devfile.io/container-contribution: true \ No newline at end of file diff --git a/devspaces-operator/editors-definitions/che-idea-server-next.yaml b/devspaces-operator/editors-definitions/che-idea-server-next.yaml deleted file mode 100644 index 87faca609a..0000000000 --- a/devspaces-operator/editors-definitions/che-idea-server-next.yaml +++ /dev/null @@ -1,126 +0,0 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -schemaVersion: 2.2.2 -metadata: - name: che-idea-server - displayName: IntelliJ IDEA Ultimate (desktop) - description: JetBrains IntelliJ IDEA Ultimate dev server for Eclipse Che - next - tags: - - Tech-Preview - attributes: - publisher: che-incubator - version: next - title: JetBrains IntelliJ IDEA Ultimate dev server for Eclipse Che - next - repository: https://github.com/che-incubator/che-idea-dev-server - firstPublicationDate: '2023-30-11' - iconMediatype: image/svg+xml - iconData: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -commands: - - id: inject-editor - apply: - component: editor-injector - - id: start-idea-server - exec: - component: editor-runtime - commandLine: nohup /idea-server/entrypoint-volume.sh > /idea-server/std.out - 2>&1 & -events: - preStart: - - inject-editor - postStart: - - start-idea-server -components: - - name: idea-server - volume: {} - - name: editor-injector - container: - image: quay.io/che-incubator/che-idea-dev-server:next - command: - - /entrypoint-init-container.sh - volumeMounts: - - name: idea-server - path: /idea-server - memoryLimit: 256Mi - memoryRequest: 32Mi - cpuLimit: 500m - cpuRequest: 30m - - name: editor-runtime - container: - image: quay.io/devfile/universal-developer-image:latest - memoryLimit: 6144Mi - memoryRequest: 2048Mi - cpuLimit: 2000m - cpuRequest: 1500m - volumeMounts: - - name: idea-server - path: /idea-server - endpoints: - - name: idea-server - attributes: - type: main - cookiesAuthEnabled: true - discoverable: false - urlRewriteSupported: true - targetPort: 3400 - exposure: public - secure: true - protocol: https - attributes: - app.kubernetes.io/component: editor-runtime - app.kubernetes.io/part-of: idea-server.eclipse.org - controller.devfile.io/container-contribution: true \ No newline at end of file diff --git a/devspaces-operator/editors-definitions/che-idea-latest.yaml b/devspaces-operator/editors-definitions/che-idea.yaml similarity index 86% rename from devspaces-operator/editors-definitions/che-idea-latest.yaml rename to devspaces-operator/editors-definitions/che-idea.yaml index 9846a7d386..b20a750bdc 100644 --- a/devspaces-operator/editors-definitions/che-idea-latest.yaml +++ b/devspaces-operator/editors-definitions/che-idea.yaml @@ -1,30 +1,19 @@ -# -# Copyright (c) 2019-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - schemaVersion: 2.2.2 metadata: name: che-idea displayName: IntelliJ IDEA Community - description: JetBrains IntelliJ IDEA Community IDE for Eclipse Che + description: Red Hat OpenShift Dev Spaces with JetBrains IntelliJ IDEA Community IDE tags: - Tech-Preview attributes: publisher: che-incubator - version: latest - title: JetBrains IntelliJ IDEA Community IDE for Eclipse Che + version: 2022.1 + title: Red Hat OpenShift Dev Spaces with JetBrains IntelliJ IDEA Community IDE repository: https://github.com/che-incubator/jetbrains-editor-images firstPublicationDate: '2022-01-11' - iconMediatype: image/svg+xml - iconData: | + skipMetaYaml: true + icon-mediatype: image/svg+xml + icon-data: | @@ -73,21 +62,20 @@ metadata: commands: - id: init-container-command apply: - component: che-idea-injector + component: idea-rhel8-injector - id: init-che-idea-command exec: - component: che-idea-runtime-description - commandLine: nohup /projector/entrypoint-volume.sh > /projector/entrypoint-logs.txt - 2>&1 & + component: idea-rhel8 + commandLine: nohup /projector/entrypoint-volume.sh > /projector/entrypoint-logs.txt 2>&1 & events: preStart: - init-container-command postStart: - init-che-idea-command components: - - name: che-idea-runtime-description + - name: idea-rhel8 container: - image: quay.io/devfile/universal-developer-image:latest + image: registry.redhat.io/devspaces/udi-rhel8:latest env: - name: PROJECTOR_ASSEMBLY_DIR value: /projector @@ -138,8 +126,8 @@ components: discoverable: false urlRewriteSupported: false attributes: - app.kubernetes.io/component: che-idea-runtime - app.kubernetes.io/part-of: che-idea.eclipse.org + app.kubernetes.io/component: idea-rhel8-runtime + app.kubernetes.io/part-of: idea-rhel8.eclipse.org controller.devfile.io/container-contribution: true - name: projector-volume volume: {} @@ -147,9 +135,9 @@ components: volume: {} - name: projector-java-configuration volume: {} - - name: che-idea-injector + - name: idea-rhel8-injector container: - image: quay.io/che-incubator/che-idea:latest + image: registry.redhat.io/devspaces/idea-rhel8:latest command: - /projector/entrypoint-init-container.sh env: From 6b6bcc110da49a98d3766f905abc403f25a99bb9 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 21 May 2024 13:36:20 +0200 Subject: [PATCH 2/7] restore files Signed-off-by: Anatolii Bazko --- ...ckerfile-devspaces-operator-bundle-3.14-32 | 51 +++++++++++++++++++ ...ces-operator-bundle-container-3.14-32.json | 9 ++++ 2 files changed, 60 insertions(+) create mode 100644 devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 create mode 100644 devspaces-operator-bundle-generated/root/buildinfo/devspaces-operator-bundle-container-3.14-32.json diff --git a/devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 b/devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 new file mode 100644 index 0000000000..9722a18979 --- /dev/null +++ b/devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 @@ -0,0 +1,51 @@ +# Copyright (c) 2020-2024 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# metadata images built in brew must be from scratch +# https://docs.engineering.redhat.com/display/CFC/Migration +FROM scratch + +COPY manifests /manifests/ +COPY metadata /metadata/ + +# append Brew metadata here +ENV SUMMARY="Red Hat OpenShift Dev Spaces operator-bundle container" \ + DESCRIPTION="Red Hat OpenShift Dev Spaces operator-bundle container" \ + PRODNAME="devspaces" \ + COMPNAME="operator-bundle" +# https://access.redhat.com/support/policy/updates/openshift#dates +# support for 4.13 ends on November 17, 2024 +# support for 4.12 ends on January 17, 2025 +LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 \ + operators.operatorframework.io.bundle.manifests.v1=manifests/ \ + operators.operatorframework.io.bundle.metadata.v1=metadata/ \ + operators.operatorframework.io.bundle.package.v1=devspaces \ + operators.operatorframework.io.bundle.channels.v1=stable \ + operators.operatorframework.io.bundle.channel.default.v1=stable \ + com.redhat.delivery.operator.bundle="true" \ + com.redhat.openshift.versions="v4.12" \ + com.redhat.delivery.backport=false \ + summary="$SUMMARY" \ + description="$DESCRIPTION" \ + io.k8s.description="$DESCRIPTION" \ + io.k8s.display-name="$DESCRIPTION" \ + io.openshift.tags="$PRODNAME,$COMPNAME" \ + com.redhat.component="$PRODNAME-$COMPNAME-container" \ + name="$PRODNAME/$COMPNAME" \ + version="3.14" \ + license="EPLv2" \ + maintainer="Anatolii Bazko , Dmytro Nochevnov , Samantha Dawley , Nick Boldt " \ + io.openshift.expose-services="" \ + usage="" +LABEL release=32 + +ADD devspaces-operator-bundle-container-3.14-32.json /root/buildinfo/content_manifests/devspaces-operator-bundle-container-3.14-32.json +LABEL "com.redhat.license_terms"="https://www.redhat.com/agreements" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2024-05-20T13:27:40" "architecture"="ppc64le" "vcs-type"="git" "vcs-ref"="40827603c96d604b27329e1bb226572388f35a78" "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/devspaces/operator-bundle/images/3.14-32" \ No newline at end of file diff --git a/devspaces-operator-bundle-generated/root/buildinfo/devspaces-operator-bundle-container-3.14-32.json b/devspaces-operator-bundle-generated/root/buildinfo/devspaces-operator-bundle-container-3.14-32.json new file mode 100644 index 0000000000..b552e39f44 --- /dev/null +++ b/devspaces-operator-bundle-generated/root/buildinfo/devspaces-operator-bundle-container-3.14-32.json @@ -0,0 +1,9 @@ +{ + "metadata": { + "icm_version": 1, + "icm_spec": "https://raw.githubusercontent.com/containerbuildsystem/atomic-reactor/master/atomic_reactor/schemas/content_manifest.json", + "image_layer_index": 0 + }, + "content_sets": [], + "image_contents": [] +} \ No newline at end of file From f3bf978616a7ae5f5260209c662fc122f6f8c4c9 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 21 May 2024 13:38:40 +0200 Subject: [PATCH 3/7] restore files Signed-off-by: Anatolii Bazko --- .../root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 | 2 +- .../devspaces-operator-bundle-container-3.14-32.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename devspaces-operator-bundle-generated/root/buildinfo/{ => content_manifests}/devspaces-operator-bundle-container-3.14-32.json (99%) diff --git a/devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 b/devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 index 9722a18979..d5121683db 100644 --- a/devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 +++ b/devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 @@ -48,4 +48,4 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 \ LABEL release=32 ADD devspaces-operator-bundle-container-3.14-32.json /root/buildinfo/content_manifests/devspaces-operator-bundle-container-3.14-32.json -LABEL "com.redhat.license_terms"="https://www.redhat.com/agreements" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2024-05-20T13:27:40" "architecture"="ppc64le" "vcs-type"="git" "vcs-ref"="40827603c96d604b27329e1bb226572388f35a78" "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/devspaces/operator-bundle/images/3.14-32" \ No newline at end of file +LABEL "com.redhat.license_terms"="https://www.redhat.com/agreements" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2024-05-20T13:27:40" "architecture"="ppc64le" "vcs-type"="git" "vcs-ref"="40827603c96d604b27329e1bb226572388f35a78" "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/devspaces/operator-bundle/images/3.14-32" diff --git a/devspaces-operator-bundle-generated/root/buildinfo/devspaces-operator-bundle-container-3.14-32.json b/devspaces-operator-bundle-generated/root/buildinfo/content_manifests/devspaces-operator-bundle-container-3.14-32.json similarity index 99% rename from devspaces-operator-bundle-generated/root/buildinfo/devspaces-operator-bundle-container-3.14-32.json rename to devspaces-operator-bundle-generated/root/buildinfo/content_manifests/devspaces-operator-bundle-container-3.14-32.json index b552e39f44..c2c1ccbb23 100644 --- a/devspaces-operator-bundle-generated/root/buildinfo/devspaces-operator-bundle-container-3.14-32.json +++ b/devspaces-operator-bundle-generated/root/buildinfo/content_manifests/devspaces-operator-bundle-container-3.14-32.json @@ -6,4 +6,4 @@ }, "content_sets": [], "image_contents": [] -} \ No newline at end of file +} From 440214ba231faf49fe0b36e10930e6da271612a0 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 4 Jun 2024 10:50:28 +0200 Subject: [PATCH 4/7] fixup Signed-off-by: Anatolii Bazko --- devspaces-operator-bundle/build/scripts/sync-che-olm.sh | 3 +++ devspaces-operator/build/scripts/sync-che-operator.sh | 4 +++- devspaces-operator/editors-definitions/che-code.yaml | 4 ++-- devspaces-operator/editors-definitions/che-idea.yaml | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/devspaces-operator-bundle/build/scripts/sync-che-olm.sh b/devspaces-operator-bundle/build/scripts/sync-che-olm.sh index 0aca61a702..73e3da7de4 100755 --- a/devspaces-operator-bundle/build/scripts/sync-che-olm.sh +++ b/devspaces-operator-bundle/build/scripts/sync-che-olm.sh @@ -286,10 +286,13 @@ for CSVFILE in ${TARGETDIR}/manifests/devspaces.csv.yaml; do V1_EXAMPLE=$(echo "$ALM_EXAMPLES" | yq '(.[] | select(.apiVersion=="org.eclipse.che/v1"))') V2_EXAMPLE=$(echo "$ALM_EXAMPLES" | yq '(.[] | select(.apiVersion=="org.eclipse.che/v2"))') FIXED_V2_EXAMPLE=$(echo "$V2_EXAMPLE" | \ + yq 'del(.spec.components.pluginRegistry.disableInternalRegistry)' | \ + yq 'del(.spec.components.pluginRegistry | select(length == 0))') | \ yq 'del(.spec.components.devfileRegistry.disableInternalRegistry)' | \ yq 'del(.spec.components.devfileRegistry.externalDevfileRegistries)'| \ yq 'del(.spec.components.devfileRegistry | select(length == 0))') FIXED_V1_EXAMPLE=$(echo "$V1_EXAMPLE" | \ + yq 'del(.spec.server.externalPluginRegistry)' | \ yq 'del(.spec.server.externalDevfileRegistry)' | \ yq 'del(.spec.server.devfileRegistryUrl)'| \ yq 'del(.spec.server.externalDevfileRegistries)'| \ diff --git a/devspaces-operator/build/scripts/sync-che-operator.sh b/devspaces-operator/build/scripts/sync-che-operator.sh index 78bcc84794..335f6991cd 100755 --- a/devspaces-operator/build/scripts/sync-che-operator.sh +++ b/devspaces-operator/build/scripts/sync-che-operator.sh @@ -258,7 +258,9 @@ fi echo "Converted (yq #2) ${OPERATOR_DEPLOYMENT_YAML}" # https://github.com/eclipse-che/che/issues/22932 -# Updating manager.yaml is not required, see `sync-che-olm.sh` +yq -riY "del(.spec.install.spec.deployments[].spec.template.spec.containers[0].env[] | select(.name | test(\"^RELATED_IMAGE_editor_definition_\")))" "${OPERATOR_DEPLOYMENT_YAML}" +echo "Converted (yq #3) ${OPERATOR_DEPLOYMENT_YAML}" + yq -riY "(.components[] | select(.name==\"che-code-injector\") | .container.image)=\"${CODE_IMAGE}\"" "${TARGETDIR}/editors-definitions/che-code.yaml" yq -riY "(.components[] | select(.name==\"che-code-runtime-description\") | .container.image)=\"${UBI_IMAGE}\"" "${TARGETDIR}/editors-definitions/che-code.yaml" yq -riY "(.components[] | select(.name==\"idea-rhel8-injector\") | .container.image)=\"${IDEA_IMAGE}\"" "${TARGETDIR}/editors-definitions/che-idea.yaml" diff --git a/devspaces-operator/editors-definitions/che-code.yaml b/devspaces-operator/editors-definitions/che-code.yaml index 66ad23cfc1..170f8be85a 100644 --- a/devspaces-operator/editors-definitions/che-code.yaml +++ b/devspaces-operator/editors-definitions/che-code.yaml @@ -10,8 +10,8 @@ metadata: repository: https://github.com/che-incubator/che-code firstPublicationDate: '2022-07-19' skipMetaYaml: true - icon-mediatype: image/svg+xml - icon-data: | + iconMediatype: image/svg+xml + iconData: | diff --git a/devspaces-operator/editors-definitions/che-idea.yaml b/devspaces-operator/editors-definitions/che-idea.yaml index b20a750bdc..bbfaa7fd74 100644 --- a/devspaces-operator/editors-definitions/che-idea.yaml +++ b/devspaces-operator/editors-definitions/che-idea.yaml @@ -12,8 +12,8 @@ metadata: repository: https://github.com/che-incubator/jetbrains-editor-images firstPublicationDate: '2022-01-11' skipMetaYaml: true - icon-mediatype: image/svg+xml - icon-data: | + iconMediatype: image/svg+xml + iconData: | From a4b4654c3c6a1e51e2fa64b81e08038b768279dd Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 4 Jun 2024 15:33:02 +0200 Subject: [PATCH 5/7] fixes Signed-off-by: Anatolii Bazko --- ...ckerfile-devspaces-operator-bundle-3.14-32 | 51 ------------------- ...ces-operator-bundle-container-3.14-32.json | 9 ---- 2 files changed, 60 deletions(-) delete mode 100644 devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 delete mode 100644 devspaces-operator-bundle-generated/root/buildinfo/content_manifests/devspaces-operator-bundle-container-3.14-32.json diff --git a/devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 b/devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 deleted file mode 100644 index d5121683db..0000000000 --- a/devspaces-operator-bundle-generated/root/buildinfo/Dockerfile-devspaces-operator-bundle-3.14-32 +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) 2020-2024 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -# metadata images built in brew must be from scratch -# https://docs.engineering.redhat.com/display/CFC/Migration -FROM scratch - -COPY manifests /manifests/ -COPY metadata /metadata/ - -# append Brew metadata here -ENV SUMMARY="Red Hat OpenShift Dev Spaces operator-bundle container" \ - DESCRIPTION="Red Hat OpenShift Dev Spaces operator-bundle container" \ - PRODNAME="devspaces" \ - COMPNAME="operator-bundle" -# https://access.redhat.com/support/policy/updates/openshift#dates -# support for 4.13 ends on November 17, 2024 -# support for 4.12 ends on January 17, 2025 -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 \ - operators.operatorframework.io.bundle.manifests.v1=manifests/ \ - operators.operatorframework.io.bundle.metadata.v1=metadata/ \ - operators.operatorframework.io.bundle.package.v1=devspaces \ - operators.operatorframework.io.bundle.channels.v1=stable \ - operators.operatorframework.io.bundle.channel.default.v1=stable \ - com.redhat.delivery.operator.bundle="true" \ - com.redhat.openshift.versions="v4.12" \ - com.redhat.delivery.backport=false \ - summary="$SUMMARY" \ - description="$DESCRIPTION" \ - io.k8s.description="$DESCRIPTION" \ - io.k8s.display-name="$DESCRIPTION" \ - io.openshift.tags="$PRODNAME,$COMPNAME" \ - com.redhat.component="$PRODNAME-$COMPNAME-container" \ - name="$PRODNAME/$COMPNAME" \ - version="3.14" \ - license="EPLv2" \ - maintainer="Anatolii Bazko , Dmytro Nochevnov , Samantha Dawley , Nick Boldt " \ - io.openshift.expose-services="" \ - usage="" -LABEL release=32 - -ADD devspaces-operator-bundle-container-3.14-32.json /root/buildinfo/content_manifests/devspaces-operator-bundle-container-3.14-32.json -LABEL "com.redhat.license_terms"="https://www.redhat.com/agreements" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2024-05-20T13:27:40" "architecture"="ppc64le" "vcs-type"="git" "vcs-ref"="40827603c96d604b27329e1bb226572388f35a78" "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/devspaces/operator-bundle/images/3.14-32" diff --git a/devspaces-operator-bundle-generated/root/buildinfo/content_manifests/devspaces-operator-bundle-container-3.14-32.json b/devspaces-operator-bundle-generated/root/buildinfo/content_manifests/devspaces-operator-bundle-container-3.14-32.json deleted file mode 100644 index c2c1ccbb23..0000000000 --- a/devspaces-operator-bundle-generated/root/buildinfo/content_manifests/devspaces-operator-bundle-container-3.14-32.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "metadata": { - "icm_version": 1, - "icm_spec": "https://raw.githubusercontent.com/containerbuildsystem/atomic-reactor/master/atomic_reactor/schemas/content_manifest.json", - "image_layer_index": 0 - }, - "content_sets": [], - "image_contents": [] -} From a9d6a8a26465a1cd0498295e45d7c836f0aa901e Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 4 Jun 2024 16:08:59 +0200 Subject: [PATCH 6/7] fixes Signed-off-by: Anatolii Bazko --- .../build/scripts/buildDigestMapAlternateURLs.sh | 2 +- devspaces-operator-bundle/build/scripts/digestExcludeList | 2 -- devspaces-operator/build/scripts/digestExcludeList | 5 ----- devspaces-operator/build/scripts/dockerContainerExtract.sh | 1 - devspaces-operator/build/scripts/images.sh | 7 ------- 5 files changed, 1 insertion(+), 16 deletions(-) diff --git a/devspaces-operator-bundle/build/scripts/buildDigestMapAlternateURLs.sh b/devspaces-operator-bundle/build/scripts/buildDigestMapAlternateURLs.sh index adf5ea2bc1..8402cdf532 100755 --- a/devspaces-operator-bundle/build/scripts/buildDigestMapAlternateURLs.sh +++ b/devspaces-operator-bundle/build/scripts/buildDigestMapAlternateURLs.sh @@ -10,7 +10,7 @@ # Contributors: # Red Hat, Inc. - initial API and implementation # -# insert RELATED_IMAGE_ fields for images referenced by the plugin and devfile registries +# insert RELATED_IMAGE_ fields for images referenced by the devfile registry tmpfile=$(mktemp) echo ${image} | sed -r \ diff --git a/devspaces-operator-bundle/build/scripts/digestExcludeList b/devspaces-operator-bundle/build/scripts/digestExcludeList index eefffcf15a..e69de29bb2 100644 --- a/devspaces-operator-bundle/build/scripts/digestExcludeList +++ b/devspaces-operator-bundle/build/scripts/digestExcludeList @@ -1,2 +0,0 @@ -quay.io/eclipse/che-sidecar-workspace-data-sync:latest -quay.io/eclipse/che-machine-exec:nightly diff --git a/devspaces-operator/build/scripts/digestExcludeList b/devspaces-operator/build/scripts/digestExcludeList index 9cd68c5d12..e69de29bb2 100644 --- a/devspaces-operator/build/scripts/digestExcludeList +++ b/devspaces-operator/build/scripts/digestExcludeList @@ -1,5 +0,0 @@ -quay.io/eclipse/che-theia:next -quay.io/eclipse/che-theia-dev:next -quay.io/eclipse/che-theia-endpoint-runtime-binary:next -quay.io/eclipse/che-sidecar-workspace-data-sync:latest -quay.io/eclipse/che-machine-exec:nightly diff --git a/devspaces-operator/build/scripts/dockerContainerExtract.sh b/devspaces-operator/build/scripts/dockerContainerExtract.sh index 56fdaa0e31..096ce9091f 100755 --- a/devspaces-operator/build/scripts/dockerContainerExtract.sh +++ b/devspaces-operator/build/scripts/dockerContainerExtract.sh @@ -5,7 +5,6 @@ if [[ ! $1 ]]; then echo "Usage: $0 CONTAINER [tar-extraction-flags]" echo "Usage: $0 quay.io/devspaces/devspaces-operator-bundle:latest" echo "Usage: $0 quay.io/devspaces/devfileregistry-rhel8:latest var/www/html/*/external_images.txt" - echo "Usage: $0 quay.io/devspaces/pluginregistry-rhel8:latest var/www/html/*/external_images.txt" exit fi diff --git a/devspaces-operator/build/scripts/images.sh b/devspaces-operator/build/scripts/images.sh index 164c75278c..dfcabc00ae 100755 --- a/devspaces-operator/build/scripts/images.sh +++ b/devspaces-operator/build/scripts/images.sh @@ -18,13 +18,6 @@ setOperatorImage() { OPERATOR_IMAGE=$(yq -r '.spec.install.spec.deployments[].spec.template.spec.containers[].image' "${CSV}") } -setPluginRegistryList() { - registry=$(yq -r '.spec.install.spec.deployments[].spec.template.spec.containers[].env[] | select(.name | test("RELATED_IMAGE_.*plugin_registry"; "g")) | .value' "${CSV}") - setRegistryImages "${registry}" - - PLUGIN_REGISTRY_LIST=${registryImages} -} - setDevfileRegistryList() { registry=$(yq -r '.spec.install.spec.deployments[].spec.template.spec.containers[].env[] | select(.name | test("RELATED_IMAGE_.*devfile_registry"; "g")) | .value' "${CSV}") From 5e49ae037460fa4d4a9ded0e6c6895650e7abb51 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Wed, 5 Jun 2024 10:40:17 +0200 Subject: [PATCH 7/7] fixes Signed-off-by: Anatolii Bazko --- .../build/scripts/sync-che-olm.sh | 10 +++++----- devspaces-operator/build/scripts/sync-che-operator.sh | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/devspaces-operator-bundle/build/scripts/sync-che-olm.sh b/devspaces-operator-bundle/build/scripts/sync-che-olm.sh index 73e3da7de4..10771b1cbe 100755 --- a/devspaces-operator-bundle/build/scripts/sync-che-olm.sh +++ b/devspaces-operator-bundle/build/scripts/sync-che-olm.sh @@ -96,11 +96,11 @@ UDI_IMAGE="registry.redhat.io/devspaces/udi-rhel8@${UDI_IMAGE_TAG}" RBAC_PROXY_IMAGE="registry.redhat.io/openshift4/ose-kube-rbac-proxy:${OPENSHIFT_TAG}" OAUTH_PROXY_IMAGE="registry.redhat.io/openshift4/ose-oauth-proxy:${OPENSHIFT_TAG}" -CODE_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://registry.redhat.io/devspaces/code-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep -v "source" | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) -CODE_IMAGE_DIGEST=$(skopeo inspect docker://registry.redhat.io/devspaces/code-rhel8:${CODE_IMAGE_VERSION_ZZZ} | yq -r '.Digest') +CODE_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://quay.io/devspaces/code-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) +CODE_IMAGE_DIGEST=$(skopeo inspect docker://quay.io/devspaces/code-rhel8:${CODE_IMAGE_VERSION_ZZZ} | yq -r '.Digest') CODE_IMAGE="registry.redhat.io/devspaces/code-rhel8@${CODE_IMAGE_DIGEST}" -IDEA_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://registry.redhat.io/devspaces/idea-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) -IDEA_IMAGE_DIGEST=$(skopeo inspect docker://registry.redhat.io/devspaces/idea-rhel8:${IDEA_IMAGE_VERSION_ZZZ} | yq -r '.Digest') +IDEA_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://quay.io/devspaces/idea-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) +IDEA_IMAGE_DIGEST=$(skopeo inspect docker://quay.io/devspaces/idea-rhel8:${IDEA_IMAGE_VERSION_ZZZ} | yq -r '.Digest') IDEA_IMAGE="registry.redhat.io/devspaces/idea-rhel8@${IDEA_IMAGE_DIGEST}" EDITORS_DEFINITIONS_ENV_VAR="[ @@ -287,7 +287,7 @@ for CSVFILE in ${TARGETDIR}/manifests/devspaces.csv.yaml; do V2_EXAMPLE=$(echo "$ALM_EXAMPLES" | yq '(.[] | select(.apiVersion=="org.eclipse.che/v2"))') FIXED_V2_EXAMPLE=$(echo "$V2_EXAMPLE" | \ yq 'del(.spec.components.pluginRegistry.disableInternalRegistry)' | \ - yq 'del(.spec.components.pluginRegistry | select(length == 0))') | \ + yq 'del(.spec.components.pluginRegistry | select(length == 0))' | \ yq 'del(.spec.components.devfileRegistry.disableInternalRegistry)' | \ yq 'del(.spec.components.devfileRegistry.externalDevfileRegistries)'| \ yq 'del(.spec.components.devfileRegistry | select(length == 0))') diff --git a/devspaces-operator/build/scripts/sync-che-operator.sh b/devspaces-operator/build/scripts/sync-che-operator.sh index 335f6991cd..0e9a45ce9f 100755 --- a/devspaces-operator/build/scripts/sync-che-operator.sh +++ b/devspaces-operator/build/scripts/sync-che-operator.sh @@ -68,11 +68,11 @@ UDI_IMAGE="registry.redhat.io/devspaces/udi-rhel8@${UDI_IMAGE_TAG}" RBAC_PROXY_IMAGE="registry.redhat.io/openshift4/ose-kube-rbac-proxy:${OPENSHIFT_TAG}" OAUTH_PROXY_IMAGE="registry.redhat.io/openshift4/ose-oauth-proxy:${OPENSHIFT_TAG}" -CODE_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://registry.redhat.io/devspaces/code-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep -v "source" | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) -CODE_IMAGE_DIGEST=$(skopeo inspect docker://registry.redhat.io/devspaces/code-rhel8:${CODE_IMAGE_VERSION_ZZZ} | yq -r '.Digest') +CODE_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://quay.io/devspaces/code-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep -v "source" | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) +CODE_IMAGE_DIGEST=$(skopeo inspect docker://quay.io/devspaces/code-rhel8:${CODE_IMAGE_VERSION_ZZZ} | yq -r '.Digest') CODE_IMAGE="registry.redhat.io/devspaces/code-rhel8@${CODE_IMAGE_DIGEST}" -IDEA_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://registry.redhat.io/devspaces/idea-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) -IDEA_IMAGE_DIGEST=$(skopeo inspect docker://registry.redhat.io/devspaces/idea-rhel8:${IDEA_IMAGE_VERSION_ZZZ} | yq -r '.Digest') +IDEA_IMAGE_VERSION_ZZZ=$(skopeo inspect docker://quay.io/devspaces/idea-rhel8:${DS_VERSION} | yq -r '.RepoTags' | sort -uV | grep "${DS_VERSION}-" | grep -E -v "\.[0-9]{10}" | tr -d '", ' | tail -1) +IDEA_IMAGE_DIGEST=$(skopeo inspect docker://quay.io/devspaces/idea-rhel8:${IDEA_IMAGE_VERSION_ZZZ} | yq -r '.Digest') IDEA_IMAGE="registry.redhat.io/devspaces/idea-rhel8@${IDEA_IMAGE_DIGEST}" # global / generic changes