HCL Accelerate value streams can include build and deployment data from Jenkins. Beyond this, Jenkins integrations can be used with HCL Accelerate pipelines to run builds and deployments directly from HCL Accelerate and further organized as deployment plans and releases. This is a short tutorial on how to create a new Jenkins integration.
The Jenkins Plugin
The HCL Accelerate Jenkins integration is different than most other plugins in that it requires a two-part setup – First create the integration in HCL Accelerate, then install and configure the plugin on the Jenkins Server. Also, rather than being added to a value stream via a vsm.json file as is done for most other plugins, the Jenkins integration gets added to a value stream via the value stream’s pipeline.
- Create the HCL Accelerate integration
- Install and configure the plugin in Jenkins.
- Use the integration in value stream pipelines.
Requirements
- If you do not have a Jenkins server available, See Jenkins documentation for running a local instance https://jenkins.io/doc/book/installing/.
- This example uses the pipeline plugin for Jenkins. This plugin is installed by default with newer versions of Jenkins. You can verify that this plugin is installed in Jenkins from the “Installed” tab under “Plugin Manager” (<Jenkins URL>/pluginManager/installed). If you do not have it installed, it’s a good idea to add it now: https://plugins.jenkins.io/workflow-aggregator.
1. Create the HCL Accelerate Integration
1.1 Navigate to the Settings Page of HCL Accelerate and select the Integrations section in the left navigation, then click on “Plugins”. Create a new Jenkins integration by clicking “Add Integration”.
1.2 Provide a name for your Jenkins integration (should describe the Jenkins instance). You can name this integration whatever you want. Click “Create”. This will generate an Integration ID and Integration Token Click “Copy to Clipboard” to copy these fields and save them. These values will be needed to configure the “HCL Accelerate” plugin installed on Jenkins.
2. Install and Configure the Plugin on Jenkins
2.1 Create an HCL Accelerate User Access Key
We are going to need a user access key from HCL Accelerate, so we’ll start by creating one now. To create an HCL Accelerate user access key, navigate to “Settings”>”My Profile” and click “Create”. It’s a good idea to name your key according to the integration that will use it.
2.2 Install the plugin on the Jenkins Server
Install the “HCL Accelerate” plugin on your Jenkins instance. Navigate to the plugins page on your Jenkins instance by clicking Manage Jenkins > Manage Plugins > Available (tab) and search for “HCL Accelerate”. When located install the plugin and restart your instance when possible.
2.3 Configure the Plugin from Jenkins
Navigate to the Jenkins configuration page Manage Jenkins > Configure System > HCL Accelerate(section). Fill in the required fields under the “HCL Accelerate” section…
- Integration ID and Integration Token values generated by the integration we created in HCL Accelerate.
- Provide the “Accelerate Base URL”. Note that if you are running Jenkins from a container, localhost will be accessible as “host.docker.internal”.
- Also provide credentials for a Jenkins user on whose behalf this plugin may access Jenkins.
- Depending on your version, you might need to provide an HCL Accelerate user access token. Use the access token we created earlier.
- Click Apply and save before clicking the Test Connection button to confirm your connection to HCL Accelerate. Upon successful connection, your data will be posted to HCL Accelerate.
3. How to Add a Jenkins Integration to a Value Stream
Jenkins integrations are added to value streams in a different way than other integrations. There is no need to edit a vsm.json file. Instead, we will need to create an “Application” on the value stream’s pipeline in order to have a target for build and deployment data.
- Navigate to “Pipeline” and click “Add app”.
- Select “Jenkins” from the dropdown.
- Type an application name. The workbook uses the name “JKE App1”.
- The new application should appear as a row within the pipeline. This Jenkins integration is now available to our value stream.
- The new application should appear as a row within the pipeline. This Jenkins integration is now available to our value stream.
Start a Conversation with Us
We’re here to help you find the right solutions and support you in achieving your business goals.