Your first stop for learning how to get started with Jira Service Management.
What does the integration offer?
Use Jenkins Integration to forward Jenkins build alerts to . determines the right people to notify based on on-call schedules– notifies via email, text messages (SMS), phone calls, and iOS & Android push notifications, and escalates alerts until the alert is acknowledged or closed.
How does the integration work?
When a build related problem occurs in Jenkins, an alert is created in automatically through the integration.
Set up the integration
Jenkins is an API-based integration. Setting it up involves the following steps:
Add a Jenkins integration in Jira Service Management
Configure the integration in Jenkins
Add a Jenkins integration
To add a Jenkins integration in , complete the following steps:
Go to your team’s operations page.
On the left navigation panel, select Integrations and then Add integration.
Run a search and select “Jenkins”.
On the next screen, enter a name for the integration.
Optional: Select a team in Assignee team if you want a specific team to receive alerts from the integration.
The integration is saved at this point.
Expand the Steps to configure the integration section and copy the API URL and API key.
You will use these while configuring the integration in Jenkins later.
Select Turn on integration.
The rules you create for the integration will work only if you turn on the integration.
Configure the integration in Jenkins
To configure the integration in Jenkins, complete the following steps:
In the Jenkins machine, go to Manage Jenkins > Go to plugin manager > Available and search for Jira Service Management Plugin, select and install it.
Go back to Jenkins main page.
Go to Manage Jenkins > Configure System > Jira Service Management Notifier Settings to set global plugin configuration.
Enter the API URL and API key copied previously into appropriate fields. API URL is set to a default value but also can be configured.
Enter the Teams to notify and alert Tags.
These fields are used as default settings, override them for specific jobs.
Select Configure and activate Jira Service Management Plugin for the Jenkins Job.
Scroll to the Post-Build Actions section of the project configuration.
Select Add post-build action.
Select Send Alert to Jira Service Management from the list displayed.
The "Send Alert to Jira Service Management" section appears in the window.
Select Save to save these changes.
Go to Configure > Send Alert to Jira Service Management to configure the Jenkins Job settings for Jira Service Management plugin.
Select Enable Sending Alerts to send an alert to Jira Service Management.
Select Notify Build Start to send an alert to Jira Service Management that notifies on build start.
Enter the API URL and API key copied previously into the appropriate fields. If these fields are filled, global settings are overridden.
Enter the teams to notify and alert tags. Fill these fields to override global settings.
Select the priority of the build status alert from Priority field.
Select the priority of the build start status alert from Build Start Alert's Priority field.
Configure the Step function in Jira Service Management
You can call Jira Service Management Trigger Step function from your pipeline stages or post actions. Jira Service Management Step function can be called with the following parameters (or without any parameter): tags(comma separated), teams(comma separated), priority, apiKey and apiUrl
An example request would be the following:
API key and API Url
You can configure API key and API url from Manage Jenkins > Configure System > Jira Service Management Notifier Settings.
You can also override API key and API url from the step function call like following: jsm(apiKey: "myApiKey", apiUrl: "myApiUrl")
Sample pipeline script