Jira can be used as Issue Tracking, Project management,etc for your project and brings Agility with its Scrum board and processes.
The most common use case is to update Jira ticket as and when there is an update on Jenkins build job.
How to achieve that ?
Lets discuss this today and see how can we update Jira issue whenever there is a failure on your respective Jenkins build job.
|You can create a JIRA issue in the project with the given Jira project key.
To begin with the process you should first :-
Install Jira plugin in Jenkins
Check out the Jira Plugins in Jenkins wiki
And then download and install through Manage Jenkins —> Manage Plugins
Then Go to Configure system and fill your Jira site details
Once done – Open your Jenkins project
Click on Post build actions
Choose “Create Jira issue”
And fill the details accordingly.
Since you have already configured your Jira project in Configure system, the details will be fetch and auto populated from your Jira instance to Jenkins Project.
Provide the Jira Project Key and Description the the test
Then choose Issue priority from the dropdown (It will fetch the Priority field from provide Jira project)
Select Issue Type (You need to provide the issue type which you want to be created in Jira for that particular project whenever there is any update through Jenkins build)
Then select the Action Id
Now, whenever the build gets failed, Jenkins will create an issue in Jira project.
Lets try some cases :
Case# 1 – Build is failed. Now Jenkins should create an issue inside the given Jira Project
Lets check our Jira, whether Jenkins has created the issue or not ?
Yes, it has created a Jira issue 🙂
Lets proceed and test another case
Case# 2 – Build has failed again and now Jenkins should add the comment on existing jira issue.
Lets check our Jira instance again, whether Jenkins has update the issue or not ?
Hurrayyy – Jenkins has updated the same issue as expected.
Folks, today we have seen how to create a Jira issue through Jenkins by following very simple steps.
Hope you enjoyed reading this article. Will be back with new Jenkins error soon.
Till then, stay tuned ……