Skip to content

Files

Latest commit

 

History

History

devspaces-pluginregistry

Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) Plugin Registry

This repository holds editor definitions and ready-to-use plugins for different languages and technologies as part of the embedded instance of the Open VSX registry to support air-gapped, offline, and proxy-restricted environments. The embedded Open VSX registry contains only a subset of the extensions published on open-vsx.org that can be used with Microsoft Visual Studio Code - Open Source IDE.

Building and Publishing .vsix Files

Any .vsix file used in DS needs to be built from source and have sources published alongside it. This is a non-negotiable requirement, and means that .vsix files hosted on OpenVSX or elsewhere are not fit for use in DS.

Luckily there is an automatic way to build and publish .vsix files and their sources. Please raise a PR against the devspaces-vscode-extensions repository.

Plugin Registry Build Process

The DS plugin registry is a fork of the upstream Che plugin registry. While the build logic to build the actual registry is very similar to upstream, the steps required to actually build + publish the DS plugin registry images is quite different.

To build the devfile registry for use with a specific Dev Spaces 3.yy version, it is necessary to check out the appropriate devspaces-3.yy-rhel-9 branch. This will ensure the build contains the correct tags and references to the images. The devspaces-3-rhel-9 branch is for the upcoming 3.next release.

Local DS Plugin Registry Build Process

A local build works just like upstream -- use the build.sh script. The only difference in DS is that the resulting devfile.yaml files generated by the build process are zipped up into a .tar.gz file and copied into the container. This differs from upstream which just copies the output folder directly. The default OpenVSX version used is che-openvsx, which will be built from https://github.com/che-incubator/che-openvsx.git at a tag defined in the job-config.json. To override this version use the --che-openvsx-url parameter in build.sh to set a URL where alternative OpenVSX sources can be downloaded. The URL must point to a file named che-openvsx.tar.gz.

DS Plugin Registry Build/Publish

All contributions to the DS plugin registry should land in this repository. From there on, the following things happen:

  1. Code in this repository is synchronized from this repo to the plugin registry directory in the devspaces-images repository by a Jenkins job.
  2. The job from step 1. kicks off a subsequent Jenkins job that then runs the bootstrap build, which uses the sync'd code in devspaces-images repository. The boostrap build builds the plugin registry in offline mode, using tagged image references. The resulting binaries and meta.yaml files are placed in a .tar.gz archive and the archive is committed to rhpkg for later usage in Brew.
  3. If step 2. is successful then a Brew build is kicked off. The Brew build copies the generated content in the .tar.gz archive from step 2. into the Dockerfile and completes the last stages of the plugin registry build.

Building and Publishing Third Party Binaries for Plugin Registry Sidecar Containers

Executables and language server dependencies needed in plugin sidecar containers can be built from this repo:

https://github.com/redhat-developer/devspaces-images

Sidecar image sources are then synced from the devspaces-images repo to a dist-git repo at Red Hat, and from built in Brew.

For example, the udi sidecar:

License

Red Hat OpenShift Dev Spaces is open sourced under the Eclipse Public License 2.0.