From 36d5d1ba3231d2fcc8f225b9c07c63d80a9f1d7e Mon Sep 17 00:00:00 2001 From: Valeriy Svydenko Date: Wed, 1 May 2024 12:09:41 +0300 Subject: [PATCH 1/4] chore: update some extensions; fix update-from-ovsx script Signed-off-by: Valeriy Svydenko --- atlassian.atlascode/Dockerfile | 1 + build/build.sh | 6 +- build/update-from-ovsx.sh | 19 ++--- .../Dockerfile | 8 +- ms-toolsai.jupyter/Dockerfile | 13 ++-- plugin-config.json | 74 +++++++++---------- redhat.ansible/Dockerfile | 18 +++-- redhat.vscode-openshift-connector/Dockerfile | 42 ----------- 8 files changed, 66 insertions(+), 115 deletions(-) rename {felixfbecker.php-debug => golang.go}/Dockerfile (83%) delete mode 100644 redhat.vscode-openshift-connector/Dockerfile diff --git a/atlassian.atlascode/Dockerfile b/atlassian.atlascode/Dockerfile index f27767b..bb111c1 100644 --- a/atlassian.atlascode/Dockerfile +++ b/atlassian.atlascode/Dockerfile @@ -25,6 +25,7 @@ RUN npm install -g ${extension_manager} RUN mkdir ./${extension_name}-src && cd ./${extension_name}-src && \ git clone ${extension_repository} ${extension_name} && \ cd ./${extension_name} && git checkout ${extension_revision} && \ + sed -i 's/NODE_OPTIONS=--openssl-legacy-provider//' package.json && \ npm install -g @vscode/vsce@${extension_vsce} gulp-cli@2.3.0 && \ if [[ -f yarn.lock ]]; then yarn install; \ else npm install --unsafe-perm=true --allow-root; fi && \ diff --git a/build/build.sh b/build/build.sh index 4ef6c34..c5445e0 100755 --- a/build/build.sh +++ b/build/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # -# Copyright (c) 2023 Red Hat, Inc. +# Copyright (c) 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/ @@ -53,9 +53,9 @@ EXTENSION_REPOSITORY=$(parse_json repository) EXTENSION_REVISION=$(parse_json revision) #Defaults -ubi8Image="nodejs-18:1-71.1698060565" +ubi8Image="nodejs-18:1-102" packageManager="npm@latest" -vsceVersion="2.17.0" +vsceVersion="2.26.0" EXTENSION_IMAGE=$(parse_json ubi8Image) if [[ $EXTENSION_IMAGE -eq "null" ]]; then diff --git a/build/update-from-ovsx.sh b/build/update-from-ovsx.sh index 7c1a078..e931ea0 100755 --- a/build/update-from-ovsx.sh +++ b/build/update-from-ovsx.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2023 Red Hat, Inc. +# Copyright (c) 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/ @@ -25,7 +25,6 @@ usage() Requires: - plugin-config.json (redhat-developer/devspaces-vscode-extensions) - openvsx-sync.json (redhat-developer/devspaces/dependencies/che-plugin-registry) - - download_vsix.sh (redhat-developer/devspaces/dependencies/che-plugin-registry) They will be downloaded if not found." exit @@ -41,19 +40,19 @@ while [[ "$#" -gt 0 ]]; do done if [[ ! "${MIDSTM_BRANCH}" ]]; then - MIDSTM_BRANCHh="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || true)" + MIDSTM_BRANCH="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || true)" if [[ $MIDSTM_BRANCH != "devspaces-3."*"-rhel-8" ]]; then MIDSTM_BRANCH="devspaces-3-rhel-8" fi fi -# Check for openvsx-sync.json, plugin-config.json and download-vsix.sh +# cleanup any previous runs +rm -rf /tmp/vsix-sources/ + +# Check for openvsx-sync.json, plugin-config.json if [[ ! -f openvsx-sync.json ]]; then curl -sSLO https://raw.githubusercontent.com/redhat-developer/devspaces/$MIDSTM_BRANCH/dependencies/che-plugin-registry/openvsx-sync.json fi -if [[ ! -f download_vsix.sh ]]; then - curl -sSLO https://raw.githubusercontent.com/redhat-developer/devspaces/$MIDSTM_BRANCH/dependencies/che-plugin-registry/build/scripts/download_vsix.sh -fi if [[ ! -f plugin-config.json ]]; then curl -sSLO https://raw.githubusercontent.com/redhat-developer/devspaces-vscode-extensions/$MIDSTM_BRANCH/plugin-config.json fi @@ -67,11 +66,7 @@ replaceField() echo "${changed}" > "plugin-config.json" } -# Update openvsx-sync.json -chmod +x -R *.sh -./download_vsix.sh -b $MIDSTM_BRANCH -j ./openvsx-sync.json --no-download - -# Read in openvsx-sync.sh to get list of pluginregistry plugins +# Read in openvsx-sync.json to get list of pluginregistry plugins pluginsOVSX=$(cat openvsx-sync.json | jq -r '.[].id') pluginsConfig=$(cat plugin-config.json | jq -r '.Plugins | keys[]') diff --git a/felixfbecker.php-debug/Dockerfile b/golang.go/Dockerfile similarity index 83% rename from felixfbecker.php-debug/Dockerfile rename to golang.go/Dockerfile index 9833905..b87c6bc 100644 --- a/felixfbecker.php-debug/Dockerfile +++ b/golang.go/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 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/ @@ -20,14 +20,14 @@ ARG extension_vsce USER root WORKDIR / -RUN npm install -g ${extension_manager} +RUN npm install -g ${extension_manager} RUN mkdir ./${extension_name}-src && cd ./${extension_name}-src && \ git clone ${extension_repository} ${extension_name} && \ - cd ./${extension_name} && git checkout ${extension_revision} && \ + cd ./${extension_name} && git checkout ${extension_revision} && cd extension && \ npm install -g @vscode/vsce@${extension_vsce} gulp-cli@2.3.0 && \ if [[ -f yarn.lock ]]; then yarn install; \ else npm install --unsafe-perm=true --allow-root; fi && \ rm -rf ./.git && tar -czvf /${extension_name}-sources.tar.gz ./ && \ - npm run build && \ + # Adding --no-dependencies for now since there is an npm list issue during packaging vsce package --out /${extension_name}.vsix diff --git a/ms-toolsai.jupyter/Dockerfile b/ms-toolsai.jupyter/Dockerfile index 80b4008..bdbcbf3 100644 --- a/ms-toolsai.jupyter/Dockerfile +++ b/ms-toolsai.jupyter/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 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/ @@ -25,10 +25,9 @@ RUN npm install -g ${extension_manager} RUN mkdir ./${extension_name}-src && cd ./${extension_name}-src && \ git clone ${extension_repository} ${extension_name} && \ cd ./${extension_name} && git checkout ${extension_revision} && \ - npm install -g @vscode/vsce@${extension_vsce} gulp-cli@2.3.0 --unsafe-perm=true&& \ - npm install --unsafe-perm=true --allow-root && \ - dnf module install -y nodejs:16/common && \ - npm install @types/vscode react-is crypto --unsafe-perm=true && \ + npm install -g @vscode/vsce@${extension_vsce} && \ + npm ci --ignore-scripts --prefer-offline --no-audit && \ + npm install && \ rm -rf ./.git && tar -czvf /${extension_name}-sources.tar.gz ./ && \ - #npm run package - gulp clean && gulp prePublishBundle && vsce package -o /${extension_name}.vsix + npm run package && \ + cp ms-toolsai-jupyter-insiders.vsix /${extension_name}.vsix diff --git a/plugin-config.json b/plugin-config.json index a50de23..2c21a86 100644 --- a/plugin-config.json +++ b/plugin-config.json @@ -4,13 +4,13 @@ "Plugins": { "atlassian.atlascode": { "repository": "https://bitbucket.org/atlassianlabs/atlascode", - "revision": "3.0.9", + "revision": "3.0.10", "update": "true", "packageManager": "yarn@1.22.19" }, "bmewburn.vscode-intelephense-client": { "repository": "https://github.com/bmewburn/vscode-intelephense", - "revision": "v1.10.2", + "revision": "v1.10.4", "update": "true" }, "dbaeumer.vscode-eslint": { @@ -30,7 +30,7 @@ }, "eamodio.gitlens": { "repository": "https://github.com/gitkraken/vscode-gitlens", - "revision": "v14.8.0", + "revision": "v14.9.0", "update": "true", "ubi8Image": "nodejs-16:1-90", "packageManager": "yarn@1.22.10" @@ -43,29 +43,24 @@ }, "esbenp.prettier-vscode": { "repository": "https://github.com/prettier/prettier-vscode", - "revision": "v10.1.0", + "revision": "v10.4.0", "update": "true", "packageManager": "yarn@1.22.10" }, - "felixfbecker.php-debug": { - "repository": "https://github.com/xdebug/vscode-php-debug", - "revision": "v1.32.1", - "update": "true" - }, "github.vscode-pull-request-github": { "repository": "https://github.com/microsoft/vscode-pull-request-github", - "revision": "v0.80.0", + "revision": "v0.86.0", "update": "true", "packageManager": "yarn@1.22.10" }, "gitlab.gitlab-workflow": { "repository": "https://gitlab.com/gitlab-org/gitlab-vscode-extension.git/", - "revision": "v4.0.0", + "revision": "v4.8.0", "update": "true" }, "golang.go": { "repository": "https://github.com/golang/vscode-go", - "revision": "v0.40.3", + "revision": "v0.41.2", "update": "true" }, "jfrog.jfrog-vscode-extension": { @@ -75,12 +70,12 @@ }, "llvm-vs-code-extensions.vscode-clangd": { "repository": "https://github.com/clangd/vscode-clangd", - "revision": "0.1.26", + "revision": "0.1.28", "update": "true" }, "ms-kubernetes-tools.vscode-kubernetes-tools": { "repository": "https://github.com/vscode-kubernetes-tools/vscode-kubernetes-tools", - "revision": "1.3.15", + "revision": "1.3.16", "update": "true" }, "ms-python.isort": { @@ -89,22 +84,21 @@ "update": "true" }, "ms-python.black-formatter": { - "comment": "Version: 2024.0.0", + "comment": "Version: 2024.2.0", "repository": "https://github.com/microsoft/vscode-black-formatter", - "revision": "12df4056a0efbf9e320e944c970bcf285d897be3", + "revision": "652cef95031be8a512f01e8c13e924ad7a67ba03", "update": "true" }, "ms-python.python": { "repository": "https://github.com/microsoft/vscode-python", - "revision": "v2024.0.1", + "revision": "v2024.2.1", "update": "true" }, "ms-toolsai.jupyter": { - "comment": "Cannot be built due to https://github.com/microsoft/vscode-jupyter/issues/13260, tracked in https://issues.redhat.com/browse/CRW-4325", + "comment": "Version: 2024.3.1", "repository": "https://github.com/microsoft/vscode-jupyter", - "revision": "4733a075e8af70d358dba81987395c9150fe5802", - "update": "false", - "packageManager": "npm@9.5.0" + "revision": "29b78d8fc33983431f0a01248cd545abcda0d7e4", + "update": "true" }, "ms-toolsai.jupyter-keymap": { "comment": "Version: 1.1.2", @@ -121,15 +115,15 @@ "packageManager": "npm@8.15.1" }, "ms-toolsai.vscode-jupyter-cell-tags": { - "comment": "Version: 0.1.8", + "comment": "Version: 0.1.9", "repository": "https://github.com/Microsoft/vscode-jupyter-cell-tags", - "revision": "5d4f72e96414442cf3afd91d8adb8fa6807fd778", + "revision": "bbc509cd58549ff592943dce340d6d3f84a51e86", "update": "true" }, "ms-toolsai.vscode-jupyter-slideshow": { - "comment": "Version: 0.1.5", + "comment": "Version: 0.1.6", "repository": "https://github.com/Microsoft/vscode-jupyter-slideshow", - "revision": "2cf41f6d1f8c8045a6810ce922378ce731aac806", + "revision": "dd2de712e89ca65f2fbe912f71c1133b52e3f252", "update": "true" }, "ms-vscode.js-debug": { @@ -151,20 +145,22 @@ "update": "false" }, "ms-dotnettools.vscode-dotnet-runtime": { + "comment": "Version: 2.0.3", "repository": "https://github.com/dotnet/vscode-dotnet-runtime", - "revision": "Runtime-v1.7.2", + "revision": "606893d9dde25814ed5e6b0bf3fd9d763281e53d", "packageManager": "yarn@1.22.10", - "update": "false" + "update": "true" }, "muhammad-sammy.csharp": { "repository": "https://github.com/muhammadsammy/free-omnisharp-vscode", - "revision": "2.15.30", + "revision": "2.22.5", "update": "true" }, "redhat.ansible": { + "comment": "Version: 24.4.0", "repository": "https://github.com/ansible/vscode-ansible", - "revision": "v2.4", - "update": "false", + "revision": "bd6caef0acc2dc4f5ed0a1a3ab7fec5acd80183d", + "update": "true", "packageManager": "yarn@1.22.10" }, "redhat.fabric8-analytics": { @@ -193,20 +189,18 @@ }, "redhat.vscode-openshift-connector": { "repository": "https://github.com/redhat-developer/vscode-openshift-tools", - "revision": "1.11.0", + "revision": "1.12.0", "update": "true" }, "redhat.vscode-quarkus": { "repository": "https://github.com/redhat-developer/vscode-quarkus", - "revision": "v1.17.0", - "update": "true", - "ubi8Image": "nodejs-14:1-101", - "packageManager": "npm@6.14.17" + "revision": "v1.29.0", + "update": "true" }, "redhat.vscode-redhat-account": { - "comment": "Version: 0.1.0", + "comment": "Version: 0.2.0", "repository": "https://github.com/redhat-developer/vscode-redhat-account", - "revision": "b1e57fae4120291427bfea9685c4b069a2235405", + "revision": "35fa63a507d66dc0c263777b2a020067fabee041", "update": "true" }, "redhat.vscode-tekton-pipelines": { @@ -238,17 +232,17 @@ }, "timonwong.shellcheck": { "repository": "https://github.com/vscode-shellcheck/vscode-shellcheck", - "revision": "v0.35.0", + "revision": "v0.37.0", "update": "true" }, "vscjava.vscode-java-debug": { "repository": "https://github.com/microsoft/vscode-java-debug", - "revision": "0.56.0", + "revision": "0.57.0", "update": "true" }, "vscjava.vscode-java-test": { "repository": "https://github.com/microsoft/vscode-java-test", - "revision": "0.40.1", + "revision": "0.41.0", "update": "true" }, "xdebug.php-debug": { diff --git a/redhat.ansible/Dockerfile b/redhat.ansible/Dockerfile index fa94dd8..2032dcb 100644 --- a/redhat.ansible/Dockerfile +++ b/redhat.ansible/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 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/ @@ -9,7 +9,7 @@ ARG extension_image -FROM registry.access.redhat.com/ubi8/${extension_image} +FROM registry.access.redhat.com/ubi8/nodejs-20:1-38.1712567745 ARG extension_repository ARG extension_revision @@ -26,8 +26,12 @@ RUN mkdir ./${extension_name}-src && cd ./${extension_name}-src && \ git clone ${extension_repository} ${extension_name} && \ cd ./${extension_name} && git checkout ${extension_revision} && \ npm install -g @vscode/vsce@${extension_vsce} gulp-cli@2.3.0 && \ - if [[ -f yarn.lock ]]; then yarn install; \ - else npm install --unsafe-perm=true --allow-root; fi && \ - rm -rf ./.git && tar -czvf /${extension_name}-sources.tar.gz ./ && \ - yarn run webpack && \ - vsce package --out /${extension_name}.vsix + yarn install && \ + yarn run clean && \ + yarn run als-compile && \ + yarn run compile && \ + npx tsc -p ./ && \ + mkdir out/log && touch out/log/package.log && \ + ./tools/package.sh && \ + mv ansible-*.vsix /${extension_name}.vsix && \ + rm -rf ./.git && tar -czvf /${extension_name}-sources.tar.gz ./ diff --git a/redhat.vscode-openshift-connector/Dockerfile b/redhat.vscode-openshift-connector/Dockerfile deleted file mode 100644 index 50ef70b..0000000 --- a/redhat.vscode-openshift-connector/Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (c) 2020-2023 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 -# - -ARG extension_image - -FROM registry.access.redhat.com/ubi8/${extension_image} - -ARG extension_repository -ARG extension_revision -ARG extension_name -ARG extension_manager -ARG extension_vsce - -USER 1001 -WORKDIR ${HOME} - -RUN npm install -g ${extension_manager} - -# build bug - if project path contain dots, it will cause one of dependencies to fail build: -# https://github.com/redhat-developer/vscode-openshift-tools/issues/3527 -# since `extension_name` contains one, a `workaround_path` variable will be used -# once the bug is fixed, workaround path can be replaced back with extension_name -ENV workaround_path="vscode-openshift-connector" -RUN mkdir ./${workaround_path}-src && cd ./${workaround_path}-src && \ - git clone ${extension_repository} ${workaround_path} && \ - cd ./${workaround_path} && git checkout ${extension_revision} && \ - rm -rf ./.git && tar -czvf ${HOME}/${extension_name}-sources.tar.gz ./ && \ - npm install -g @vscode/vsce@${extension_vsce} gulp-cli@2.3.0 && \ - if [[ -f yarn.lock ]]; then yarn install; \ - else npm install --unsafe-perm=true --allow-root; fi && \ - vsce package --out ${HOME}/${extension_name}.vsix - -USER root - -RUN mv ${HOME}/${extension_name}-sources.tar.gz / && \ - mv ${HOME}/${extension_name}.vsix / From 420905152be58dcae1f48cb39632091d8e46048d Mon Sep 17 00:00:00 2001 From: Valeriy Svydenko Date: Wed, 1 May 2024 12:16:59 +0300 Subject: [PATCH 2/4] code cleanup Signed-off-by: Valeriy Svydenko --- golang.go/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/golang.go/Dockerfile b/golang.go/Dockerfile index b87c6bc..7e0fb03 100644 --- a/golang.go/Dockerfile +++ b/golang.go/Dockerfile @@ -20,7 +20,7 @@ ARG extension_vsce USER root WORKDIR / -RUN npm install -g ${extension_manager} +RUN npm install -g ${extension_manager} RUN mkdir ./${extension_name}-src && cd ./${extension_name}-src && \ git clone ${extension_repository} ${extension_name} && \ @@ -29,5 +29,4 @@ RUN mkdir ./${extension_name}-src && cd ./${extension_name}-src && \ if [[ -f yarn.lock ]]; then yarn install; \ else npm install --unsafe-perm=true --allow-root; fi && \ rm -rf ./.git && tar -czvf /${extension_name}-sources.tar.gz ./ && \ - # Adding --no-dependencies for now since there is an npm list issue during packaging vsce package --out /${extension_name}.vsix From 7e44562287fbeaed7fb8fee718d13bdb0f56f83d Mon Sep 17 00:00:00 2001 From: Valeriy Svydenko Date: Wed, 1 May 2024 16:11:19 +0300 Subject: [PATCH 3/4] update versions of extensions after https://github.com/redhat-developer/devspaces/pull/1071 Signed-off-by: Valeriy Svydenko --- plugin-config.json | 22 ++++++------- redhat.vscode-openshift-connector/Dockerfile | 34 ++++++++++++++++++++ 2 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 redhat.vscode-openshift-connector/Dockerfile diff --git a/plugin-config.json b/plugin-config.json index 2c21a86..12a506f 100644 --- a/plugin-config.json +++ b/plugin-config.json @@ -30,7 +30,7 @@ }, "eamodio.gitlens": { "repository": "https://github.com/gitkraken/vscode-gitlens", - "revision": "v14.9.0", + "revision": "v14.9.1", "update": "true", "ubi8Image": "nodejs-16:1-90", "packageManager": "yarn@1.22.10" @@ -49,23 +49,23 @@ }, "github.vscode-pull-request-github": { "repository": "https://github.com/microsoft/vscode-pull-request-github", - "revision": "v0.86.0", + "revision": "v0.86.1", "update": "true", "packageManager": "yarn@1.22.10" }, "gitlab.gitlab-workflow": { "repository": "https://gitlab.com/gitlab-org/gitlab-vscode-extension.git/", - "revision": "v4.8.0", + "revision": "v4.9.0", "update": "true" }, "golang.go": { "repository": "https://github.com/golang/vscode-go", - "revision": "v0.41.2", + "revision": "v0.41.4", "update": "true" }, "jfrog.jfrog-vscode-extension": { "repository": "https://github.com/jfrog/jfrog-vscode-extension", - "revision": "2.9.6", + "revision": "2.10.1", "update": "true" }, "llvm-vs-code-extensions.vscode-clangd": { @@ -91,7 +91,7 @@ }, "ms-python.python": { "repository": "https://github.com/microsoft/vscode-python", - "revision": "v2024.2.1", + "revision": "v2024.4.1", "update": "true" }, "ms-toolsai.jupyter": { @@ -153,7 +153,7 @@ }, "muhammad-sammy.csharp": { "repository": "https://github.com/muhammadsammy/free-omnisharp-vscode", - "revision": "2.22.5", + "revision": "2.23.15", "update": "true" }, "redhat.ansible": { @@ -165,7 +165,7 @@ }, "redhat.fabric8-analytics": { "repository": "https://github.com/fabric8-analytics/fabric8-analytics-vscode-extension", - "revision": "v0.9.2", + "revision": "v0.9.4", "update": "true", "packageManager": "npm@6.14.17" }, @@ -189,7 +189,7 @@ }, "redhat.vscode-openshift-connector": { "repository": "https://github.com/redhat-developer/vscode-openshift-tools", - "revision": "1.12.0", + "revision": "1.13.0", "update": "true" }, "redhat.vscode-quarkus": { @@ -232,7 +232,7 @@ }, "timonwong.shellcheck": { "repository": "https://github.com/vscode-shellcheck/vscode-shellcheck", - "revision": "v0.37.0", + "revision": "v0.37.1", "update": "true" }, "vscjava.vscode-java-debug": { @@ -242,7 +242,7 @@ }, "vscjava.vscode-java-test": { "repository": "https://github.com/microsoft/vscode-java-test", - "revision": "0.41.0", + "revision": "0.41.1", "update": "true" }, "xdebug.php-debug": { diff --git a/redhat.vscode-openshift-connector/Dockerfile b/redhat.vscode-openshift-connector/Dockerfile new file mode 100644 index 0000000..61d8207 --- /dev/null +++ b/redhat.vscode-openshift-connector/Dockerfile @@ -0,0 +1,34 @@ +# +# Copyright (c) 2020-2023 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 +# + +ARG extension_image + +FROM registry.access.redhat.com/ubi8/${extension_image} + +ARG extension_repository +ARG extension_revision +ARG extension_name +ARG extension_manager +ARG extension_vsce + +RUN npm install -g ${extension_manager} + +RUN mkdir /tmp/${extension_name}-src && cd /tmp/${extension_name}-src && \ + git clone ${extension_repository} ${extension_name} && \ + cd ${extension_name} && git checkout ${extension_revision} && \ + rm -rf ./.git && tar -czvf /tmp/${extension_name}-sources.tar.gz ./ && \ + npm install -g @vscode/vsce@${extension_vsce} && \ + if [[ -f yarn.lock ]]; then yarn install; \ + else npm install --unsafe-perm=true --allow-root; fi && \ + vsce package --out /tmp/${extension_name}.vsix + +USER root + +RUN mv /tmp/${extension_name}-sources.tar.gz / && \ + mv /tmp/${extension_name}.vsix / From b6e9e9740f3c946b0c1222498342d8bd2ef1dba9 Mon Sep 17 00:00:00 2001 From: Valeriy Svydenko Date: Thu, 2 May 2024 14:30:42 +0300 Subject: [PATCH 4/4] fix build pr check Signed-off-by: Valeriy Svydenko --- .ci/extension_build.sh | 38 +++++++++++++++++++++++ .github/workflows/extension-pr-check.yaml | 7 ++--- plugin-config.json | 5 +-- 3 files changed, 44 insertions(+), 6 deletions(-) create mode 100755 .ci/extension_build.sh diff --git a/.ci/extension_build.sh b/.ci/extension_build.sh new file mode 100755 index 0000000..563f888 --- /dev/null +++ b/.ci/extension_build.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Copyright (c) 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 +# +# This script is used to check for updates to the Visual Studio plugins listed in plugin-config.json. + +set -ex + +echo "Checking for updates to the Visual Studio plugins listed in plugin-config.json" + +MAIN_BRANCH="devspaces-3-rhel-8" +curl -sSLo plugin-config-main.json https://raw.githubusercontent.com/redhat-developer/devspaces-vscode-extensions/$MAIN_BRANCH/plugin-config.json + +pluginsConfig=$(jq -r '.Plugins | keys[]'