Creating plug-ins with the plug-ins SDK

You can create your own plug-ins and install them in HCL Accelerate. After installing custom plug-ins, you can integrate them in your releases, reports, and value streams.

HCL Accelerate provides a SDK that contains the tools, including local dependencies and wrappers, that you need to create your own plug-ins. The plug-in SDK provides a sample plug-in that you can use to get started, and JavaScript templates that you can customize for your own plug-ins.

To create a plug-in, your development environment must include the following items:
  • Node.js version 12 or later
  • NPM version 6 or later
  • Docker
  • HCL Accelerate version 2.0 or later

To get started with the plug-in SDK, complete the following steps:

  1. Download the plug-in SDK. On the HCL Accelerate Plugins tab, click Download Plugin Sample. After the download is finished, extract the compressed file.
  2. Build the sample plug-in. In the ucv-ext-sdk-template folder, run the following commands. Additional instructions are provided in the SDK Readme.md file.
    
          npm install
         npm run dist-runnable
         docker build . -t name:tag
    The name value can be any value that you want. The tag value must represent the latest image version, or some other valid semantic version. For example, docker build . -t testplugin:0.1.
  3. Upload the sample plug-in. On the HCL Accelerate Plugins tab, click Load Plugin, and then select the Docker image that contains your plug-in. To upload the image from the previous step, you specify testplugin:0.1.
  4. Create an integration by using the sample plug-in. On the Plugins tab, click Add Integration.

Plug-ins are categorized by data collection and communication methods. Generally, plug-ins are designed to use one of the following communication methods.

  • Webhook. These plug-ins use webhooks to communicate with a defined HCL Accelerate API endpoint. The webhook is used to trigger data collection events. Examples include the AppScan™, and SonarCube plug-ins.
  • Poller. These plug-ins are based on an event defined by the plug-in. Queries are performed to determine when to send and update data from the external service. Examples include the GitHub™, and Rally plug-ins.
  • Parser. These plug-ins integrate functions to parse a specific file type and create a metric document that HCL Accelerate can display with other value stream management and portfolio views. Examples include the JUnit, and OneTest plug-ins.

The plug-in SDK provides JavaScript templates for each type. For example, the template ucv-ext-sdk-templates/src/endpoints/SampleEdnpoint.js defines the properties that you need to create an endpoint-type plug-in.