Building and publishing VSIX extensions for plugin registry
The Open Source Way at Red Hat is to comply with Open Source licenses. As such, all VS Code extensions in the Che and CRW plugin registries must be built from source and have that source distributed along side the binary distribution.
vscode-extensions-packaging - a Jenkins Pipeline that is able to build a VSIX extension from a given repository, and publish it to https://download.jboss.org/jbosstools/vscode/3rdparty , along with its sources
1) Navigate to the CRW CI https://codeready-workspaces-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/CRW_CI/view/Builds/job/vscode-extensions-packaging/ 2) Start the new build and provide the necessary parameters:
branchToBuildPlugin - branch or tag, or commit SHA of extension repository (e.g.
extensionPath - link to the repository to build the extension from (e.g.
publishAddr - full address for the endpoint, that is used to publish extensions. Default value contains appropriate credentials and link to be used to upload to https://download.jboss.org/jbosstools/vscode/3rdparty/
publishDestination - end folder for the plugin (after /vscode/3rdparty) (e.g
3) As the job is running, check out the console output, as the job would build an extension. If it does so successfully, it would prompt a user input for approval of the artifact to publish. It allows to check out the built artifact manually before it goes to dl.jboss.org. Artifact can be accessed at the following link (insert your job number at JOB_NUMBER) https://codeready-workspaces-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/CRW_CI/view/Builds/job/vscode-extensions-packaging/JOB_NUMBER/artifact/
As the job checks out the provided extension repository, it would attempt to build it with a set of standard commands - running "npm install" and then "vsce package". Should your plugin require a different set of commands for building, edit the vsix.Jenkinsfile.
Along with the packaged extensions, the job must also provide sources. For your built extension, make sure you would collect all the relevant sources (excluding the build-generated files) are packaged into a respective sources tar.gz.
If the extension was built from "master" branch or commit SHA, then the resulting VSIX extension and sources archive will have commit SHA appended to them.
After the artifact is published, it can now be accessed at https://download.jboss.org/jbosstools/vscode/3rdparty/, along with its sources