To add a plug-in:
-
Check out the plugin registry sources.
$ git clone https://github.com/eclipse/che-plugin-registry; \ cd che-plugin-registry
-
Create a
meta.yamlin some local folder. This can be done from scratch or by copying from an existing plug-in’smeta.yamlfile.$ PLUGIN="v3/plugins/new-org/new-plugin/0.0.1"; \ mkdir -p ${PLUGIN}; cp v3/plugins/che-incubator/cpptools/0.1/* ${PLUGIN}/ echo "${PLUGIN##*/}" > ${PLUGIN}/../latest.txt -
If copying from an existing plug-in, make changes to the
meta.yamlfile to suit your needs. Make sure your new plug-in has a uniquetitle,displayNameanddescription. Update thefirstPublicationDateto today’s date. -
These fields in
meta.yamlmust match the path defined inPLUGINabove.publisher: new-org name: new-plugin version: 0.0.1
-
Get the name of the Pod that hosts the plug-in registry container. To do this, filter the
component=plugin-registrylabel:$ PLUGIN_REG_POD=$(kubectl get -o custom-columns=NAME:.metadata.name \ --no-headers pod -l component=plugin-registry)
-
Regenerate the registry’s
index.jsonfile to include your new plug-in.$ cd che-plugin-registry; \ "$(pwd)/build/scripts/generate_latest_metas.sh" v3 && \ "$(pwd)/build/scripts/check_plugins_location.sh" v3 && \ "$(pwd)/build/scripts/set_plugin_dates.sh" v3 && \ "$(pwd)/build/scripts/check_plugins_viewer_mandatory_fields.sh" v3 && \ "$(pwd)/build/scripts/index.sh" v3 > v3/plugins/index.json -
Copy the new
index.jsonandmeta.yamlfiles from your new local plug-in folder to the container.$ cd che-plugin-registry; \ LOCAL_FILES="$(pwd)/${PLUGIN}/meta.yaml $(pwd)/v3/plugins/index.json"; \ kubectl exec ${PLUGIN_REG_POD} -i -t -- mkdir -p /var/www/html/${PLUGIN}; \ for f in $LOCAL_FILES; do e=${f/$(pwd)\//}; echo "Upload ${f} -> /var/www/html/${e}"; \ kubectl cp "${f}" ${PLUGIN_REG_POD}:/var/www/html/${e}; done -
The new plug-in can now be used from the existing Che instance’s plug-in registry. To discover it, go to the Che dashboard, then click the
Workspaceslink. From there, click the gear icon to configure one of your workspaces. Select thePluginstab to see the updated list of available plug-ins.