From ec7329e4d0d35c6135022e88a5f88868f2bcbeee Mon Sep 17 00:00:00 2001 From: Valerii Svydenko Date: Wed, 8 May 2024 10:21:29 +0300 Subject: [PATCH] chore: update some extensions; fix update-from-ovsx script (#80) * chore: update some extensions; fix update-from-ovsx script Signed-off-by: Valeriy Svydenko * code cleanup Signed-off-by: Valeriy Svydenko * update versions of extensions after https://github.com/redhat-developer/devspaces/pull/1071 Signed-off-by: Valeriy Svydenko * fix build pr check Signed-off-by: Valeriy Svydenko --------- Signed-off-by: Valeriy Svydenko --- .ci/extension_build.sh | 38 +++++++++ .github/workflows/extension-pr-check.yaml | 7 +- atlassian.atlascode/Dockerfile | 1 + build/build.sh | 6 +- build/update-from-ovsx.sh | 19 ++--- .../Dockerfile | 5 +- ms-toolsai.jupyter/Dockerfile | 13 ++-- plugin-config.json | 77 +++++++++---------- redhat.ansible/Dockerfile | 18 +++-- redhat.vscode-openshift-connector/Dockerfile | 24 ++---- 10 files changed, 115 insertions(+), 93 deletions(-) create mode 100755 .ci/extension_build.sh rename {felixfbecker.php-debug => golang.go}/Dockerfile (93%) 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[]' "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 93% rename from felixfbecker.php-debug/Dockerfile rename to golang.go/Dockerfile index 9833905..7e0fb03 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/ @@ -24,10 +24,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} && \ + 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 && \ 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 1536d09..d9c5031 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.1", "update": "true", "ubi8Image": "nodejs-16:1-90", "packageManager": "yarn@1.22.10" @@ -43,44 +43,39 @@ }, "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.1", "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.9.0", "update": "true" }, "golang.go": { "repository": "https://github.com/golang/vscode-go", - "revision": "v0.40.3", + "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": { "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.4.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.23.15", "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,19 @@ }, "redhat.vscode-openshift-connector": { "repository": "https://github.com/redhat-developer/vscode-openshift-tools", - "revision": "1.11.0", + "revision": "1.13.0", "update": "true" }, "redhat.vscode-quarkus": { + "comment": "Version: 1.17.0", "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": "c225c2f85d8f680a8de335bb294013d27f1e7b51", + "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 +233,17 @@ }, "timonwong.shellcheck": { "repository": "https://github.com/vscode-shellcheck/vscode-shellcheck", - "revision": "v0.35.0", + "revision": "v0.37.1", "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.1", "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 index 50ef70b..61d8207 100644 --- a/redhat.vscode-openshift-connector/Dockerfile +++ b/redhat.vscode-openshift-connector/Dockerfile @@ -17,26 +17,18 @@ 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 && \ +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 ${HOME}/${extension_name}.vsix + vsce package --out /tmp/${extension_name}.vsix USER root -RUN mv ${HOME}/${extension_name}-sources.tar.gz / && \ - mv ${HOME}/${extension_name}.vsix / +RUN mv /tmp/${extension_name}-sources.tar.gz / && \ + mv /tmp/${extension_name}.vsix /