Configuring Jenkins
Jenkins is an open source, server-based tool that builds and tests software continuously, supporting the practices of continuous integration and continuous delivery.
Before you create a Jenkins tool integration, you must have a Jenkins server.
With the Jenkins tool integration, you can send your Jenkins job notifications to other tools in your toolchain, such as Slack and PagerDuty. To trace code in deployments, you can add deployment messages to your Git commits and your related Git or JIRA issues. You can also view your deployments on the Toolchain Connections page. You can feed test results to DevOps Insights, add automated quality gates, and track your deployment risk.
Configure Jenkins to automate the continuous building, testing, and deployment of your apps:
-
If you are configuring this tool integration as you are creating the toolchain, in the Configurable Integrations section, click Jenkins.
-
If you have a toolchain and are adding this tool integration to it, from the IBM Cloud console, click the Menu icon > Platform Automation > Toolchains. On the Toolchains page, click the toolchain to open its Overview page. Alternatively, on your app's Overview page, on the Continuous delivery card, click View toolchain. Then, click Overview.
a. Click Add tool.
b. In the Tool Integrations section, click Jenkins.
-
Type the name that you want to display for this tool integration on the Jenkins card in your toolchain.
-
Type the URL for the Jenkins server that you want to open when you click the Jenkins card from your toolchain.
-
Copy the generated toolchain webhook.
-
In your Jenkins server, complete these steps:
a. Install the IBM Cloud DevOps plug-in.
b. Configure Jenkins to notify toolchains.
c. Return to the Configure the Integration page for the Jenkins tool integration.
-
Click Create Integration.
-
On the Toolchain's Overview page, on the Third-Party tools card, click Jenkins to view the Jenkins server.
Configuring Jenkins by using the API
The Jenkins tool integration supports the following configuration parameters that you can use with the Toolchain HTTP API and SDKs when you create, read, and update tool integrations.
You must specify the tool_type_id
property in the request body with the jenkins
value.
Parameter | Usage | Type | Terraform argument | Description |
---|---|---|---|---|
api_token | optional, updatable | Password | api_token | The API token to use for Jenkins REST API calls so that DevOps Insights can collect data from Jenkins. You can find the API token on the Configuration page of your Jenkins instance. You can use a toolchain secret reference for this parameter. For more information about secret references, see Protecting your sensitive data in Continuous Delivery. |
api_user_name | optional, updatable | String | api_user_name | The username to use with the Jenkins server's API token, which is required so that DevOps Insights can collect data from Jenkins. You can find your API username on the Configuration page of your Jenkins instance. |
dashboard_url | required, updatable | String | dashboard_url | The URL of the Jenkins server dashboard for this tool integration. In the graphical UI, the browser goes to this dashboard when you click the Jenkins tool integration card. |
name | required, updatable | String | name | The name of this tool integration. |
webhook_url | optional, updatable | String | webhook_url | The webhook to use in your Jenkins jobs to send notifications to other tools in your toolchain. |