Skip to content

Commit

Permalink
Update adding or removing extensions procedure (#2753)
Browse files Browse the repository at this point in the history
* Update adding or removing extensions procedure

Signed-off-by: Valeriy Svydenko <[email protected]>

* chore: describe how to build plugin registry in the product

Signed-off-by: Valeriy Svydenko <[email protected]>

---------

Signed-off-by: Valeriy Svydenko <[email protected]>
  • Loading branch information
svor authored and deerskindoll committed Jul 8, 2024
1 parent ab52d71 commit bb1157b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
. Download or fork and clone the link:https://github.com/eclipse-che/che-plugin-registry[plugin registry repository].
... Download or fork and clone the link:https://github.com/eclipse-che/che-plugin-registry[plugin registry repository].

. For each extension that you need to add or remove, edit link:https://github.com/eclipse-che/che-plugin-registry/blob/main/openvsx-sync.json[the `openvsx-sync.json` file]:
... For each extension that you need to add or remove, edit link:https://github.com/eclipse-che/che-plugin-registry/blob/main/openvsx-sync.json[the `openvsx-sync.json` file]:
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
... Start a workspace using the link:https://github.com/eclipse-che/che-plugin-registry[plugin registry repository].

... Open a terminal and check out the Git tag that corresponds to your {prod-short} version (e.g., `7.87.0`):
+
[source]
----
git checkout $PRODUCT_VERSION
----

... Open the `che-plugin-registry/openvsx-sync.json` file and add or remove extensions.

... Execute `1. Build and Publish a Custom Plugin Registry` task in the workspace (Terminal -> Run Task... -> devfile -> 1. Build and Publish a Custom Plugin Registry).

... Execute `2. Configure Che to use the Custom Plugin Registry` task in the workspace (Terminal -> Run Task... -> devfile -> 2. Configure Che to use the Custom Plugin Registry).
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ pass:[<!-- vale RedHat.TermsErrors = YES -->]

.Procedure

. Get the publisher and extension names of each chosen extension:
. Get the publisher and extension name of each chosen extension:

.. Find the extension on the link:https://www.open-vsx.org/[Open VSX registry website] and copy the URL of the extension's listing page.
.. Find the extension on the link:https://open-vsx.org/[Open VSX registry website] and copy the URL of the extension's listing page and extension's version.

.. Extract the __<publisher>__ and __<extension>__ names from the copied URL:
.. Extract the __<publisher>__ and __<extension>__ name from the copied URL:
+
[subs="+quotes"]
----
https://www.open-vsx.org/extension/__<publisher>__/__<extension>__
https://open-vsx.org/extension/__<publisher>__/__<name>__
----
+
[TIP]
Expand All @@ -33,30 +33,53 @@ If the extension publisher is unavailable or unwilling to publish the extension
====

. Build the custom plugin registry image and update CheCluster custom resource:
+
[TIP]
====
* During the build process, each extension will be verified for compatibility with the version of Visual Studio Code used in {prod-short}.
====

.. Using {prod-short} instance:

... Login to your {prod-short} instance as an administrator.

include::example$snip_{project-context}-steps-to-build-custom-plugin-registry-in-workspace.adoc[]

.. Using Linux operating system:
+
[TIP]
====
* Podman and NodeJS version 18.20.3 or higher should be installed in the system.
====

include::example$snip_{project-context}-steps-to-add-or-remove-extensions-in-openvsx-sync-json.adoc[]

** To add extensions, add the publisher and extension names to the `openvsx-sync.json` file.
** To remove extensions, remove the publisher and extension names from the `openvsx-sync.json` file.
** To add extensions, add the publisher, name and extension version to the `openvsx-sync.json` file.
** To remove extensions, remove the publisher, name and extension version from the `openvsx-sync.json` file.
** Use the following JSON syntax:
+
[source,json,subs="+quotes"]
----
{
"id": "__<publisher>__.__<extension>__"
"id": "__<publisher>__.__<name>__",
"version": "__<extension_version>__"
}
----
+
[TIP]
====
* The latest extension version on link:https://open-vsx.org[open-vsx.org] is the default. Alternatively, you can add `"version": "__<extension_version>__"` on a new line to specify a version.
* If you have a closed-source extension or an extension developed only for internal use in your organization, you can add the extension directly from a `.vsix` file by using a URL accessible to your custom plugin registry container:
+
[source,json,subs="+quotes"]
----
{
"id": "__<publisher>__.__<extension>__",
"id": "__<publisher>__.__<name>__",
"download": "__<url_to_download_vsix_file>__",
"version": "__<extension_version>__"
}
Expand All @@ -66,23 +89,23 @@ include::example$snip_{project-context}-steps-to-add-or-remove-extensions-in-ope
====

. Build the plugin registry container image and publish it to a container registry like link:https://quay.io/[quay.io]:
... Build the plugin registry container image and publish it to a container registry such as link:https://quay.io/[quay.io]:

.. {empty}
.... {empty}
+
[subs="+attributes,+quotes"]
----
$ ./build.sh -o __<username>__ -r quay.io -t custom
----

.. {empty}
.... {empty}
+
[subs="+attributes,+quotes"]
----
$ {docker-cli} push quay.io/__<username/plugin_registry:custom>__
----

. Edit the `CheCluster` custom resource in your organization's cluster to point to the image (for example, on link:https://quay.io/[quay.io]) and save the changes:
... Edit the `CheCluster` custom resource in your organization's cluster to point to the image (for example, on link:https://quay.io/[quay.io]) and save the changes:
+
[source,yaml,subs="+quotes"]
----
Expand Down

0 comments on commit bb1157b

Please sign in to comment.