what is Jira official plugin for Jenkins?

Ashok April 21, 2020

I am trying to integrate Jenkins with Jira cloud. But i see so many plugins available in Jenkins for Jira. I'm not sure which one is the right one to use. what is Atlassian official plugin for Jenkins. what exactly is the difference between those plugins. can you also suggest me the primary use case in this Jenkins-Jira integration.

3 answers

1 accepted

0 votes
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 22, 2020

Hello @Ashok ,

The official way to integrate Jira Software with Jenkins is described in the below documentation page that also provides some use cases and examples:

 

Please review above page and let us know if you have further questions.

 

Cheers,
Dario

Ashok April 27, 2020

@Dario B Thank you for the reply. I got the answer.

Like Dario B likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 29, 2020

You are very welcome @Ashok , happy to know this answered your question!  :) 

Cheers,
Dario

Ashok April 29, 2020

Hey @Dario B can we discuss something about this plugin Jira here? As this plugin is not official one from Atlassian.

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2020

Hi @Ashok ,

This community is open for every kind of discussion. :) 

Just be aware that not being this an official app from Atlassian I have limited knowledge about it and I might not be the best person to assist. On the other hand, other community members might know more and jump in the discussion. 

Do you have any issue using that plugin? 

Ashok April 30, 2020

Hi @Dario B ,

Yes, i'm having few issues with that plugin. 

1. I'm unable to connect to Jira from Jenkins (i.e. getting error for validation settings in Jenkins configuration). And this happening with one Jenkins server, if i try with Jenkins in another machine it works.

2. If connection works then i'm unable to create Jira issue from Jenkins. I got 

java.lang.NullPointerException
 at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:413)
 at hudson.plugins.jira.JiraCreateIssueNotifier.createJiraIssue(JiraCreateIssueNotifier.java:204)
 at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:357)
 at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:159)
 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
 at hudson.model.Build$BuildExecution.post2(Build.java:186)
 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
 at hudson.model.Run.execute(Run.java:1881)
 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
 at hudson.model.ResourceController.execute(ResourceController.java:97)
 at hudson.model.Executor.run(Executor.java:428)
Build step 'Jira: Create issue' marked build as failure


overall it was not a good experience working with this plugin. i looked around for solutions but didn't get much. 

I really appreciate your time and help.

Thank You.

Like Dario B likes this
Ashok May 14, 2020

Hi @Dario B

I'm getting this one when i as trying send build info to Jira from Jenkins. 

jiraSendBuildInfo: SKIPPED_ISSUE_KEYS_NOT_FOUND: No issue keys found in the current branch name. Not sending build information to Jira.

Can you help me to solve this one. 

Like Max Cascone likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 15, 2020

Hi @Ashok ,

The error message is pretty much self explanatory:

No issue keys found in the current branch name

You need to have an issue key in the branch name otherwise Jira cannot possibly know which issue has to be updated with the build information from Jenkins. 

 

Please notice that this is listed as one of the pre-requisites for the integration in the documentation already provided:

Before you begin

Time: 15-30 mins

Prerequisites

  • You're a site administrator of your Jira Cloud site.

  • You're an admin in Jenkins and you can install, update, and delete plugins.

  • You're using a ‘Multibranch Pipeline’ in Jenkins (this is the only item supported in Jenkins today).

  • You can edit the Jenkinsfile in your source code/repo for the pipeline(s) you want to use this integration with.

  • Your team should be adding issue keys (e.g. FUSE-123) as part of their commit messages (for deployment information) and branch names (for build information). If your team isn't already following this pattern, you can read more here.

 

Please review above page and let us know in case further support is needed.

 

Cheers,
Dario

Ashok May 15, 2020

@Dario B  Thank you for response. 

Adding issue key in the branch name is the only way to send build info form Jenkins to Jira?

or is there any other work around this https://plugins.jenkins.io/atlassian-jira-software-cloud/ ?

Even after adding Jira issue key in branch name its not automatically detecting issue-key in branch name when i pull the code from GitHub in Jenkins.

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 28, 2020

Hi @Ashok ,

 

After reading below sentence I believe I need to know a bit more on what changed:

Even after adding Jira issue key in branch name its not automatically detecting issue-key in branch name when i pull the code from GitHub in Jenkins.

 

The previously error was clearly saying the issue key was missing from the branch name.

What happens now when you try to send build info to Jira from Jenkins?

 

Cheers,
Dario

Ashok May 28, 2020

Hello @Dario B , 

It's working fine now. I missed few things when i was doing last time. I didn't use multibranch pipeline and there was some issue with checkout stage in Jenkins pipeline. 

But i got something else here. Is DVCS connecter is the only option for Integrating Jira software cloud and GitHub enterprise server? I saw somewhere in Atlassian community saying DVCS is going to be deprecated soon. so what is the best approach here? Go head and use the DVCS to integrate or ?

Thank you for coming back again. I really appreciate your help.

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 29, 2020

Hi @Ashok ,

This and many other concerns have already been addressed in the below article:

  • Everything you need to know about migrating from the DVCS Connector to the new GitHub for Jira app

    What is happening to GitHub Enterprise connections, which also use the DVCS Connector?

    The integration between GitHub Enterprise (on-premise version) to Jira Cloud will not be affected, as we still have work to do in the future to make this possible in the new integration. This is because of common issues that affect server to cloud type integrations and require a bit more work & thought to build a great experience for you.

    Please continue to use the DVCS Connector integration method if you are a GitHub Enterprise customer.

    Is the DVCS Connector being deprecated, and if so, when?

    Yes, we will be completely removing the DVCS Connector integration for GitHub in favour of the new GitHub for Jira app. However, we plan to slowly phase this out and allow existing customers plenty of time to move over.

    We are aware of the many Jira Software Cloud customers who are already using and enjoying the GitHub integration via the DVCS Connector. We have tried our best to make the migration as easy as possible and will address any issues/bugs that may come up as fast as we can.

    The DVCS Connector for GitHub.com (the GitHub enterprise connection has no date to move over yet) will no longer be supported as of June 30th, 2019.

 

Review above link for more details.

 

Also, please notice that this new question has nothing to do with the original topic and should have been asked in a separate thread. It is good practice to have different issues discussed in different threads.

 

Cheers,
Dario

Ashok May 29, 2020

@Dario B got it. thanks.

Like Dario B likes this
Arunraj April 14, 2021

hai @Dario B 

jiraSendBuildInfo: SKIPPED_ISSUE_KEYS_NOT_FOUND: No issue keys found in the current branch name. Not sending build information to Jira.

Same issue getting for me, but my case is when run the jenkins that deploy info should create a new issue in jira not update so how to create a issue key automatically? 

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 15, 2021

@Arunraj  

I am not sure I understand what you are asking.

However, the error message says that there is no issue-key in the branch name and therefore it is not going to send any build information to Jira.

How is the branch named? 

Arunraj April 15, 2021

@Dario B Actually i want send the build info to jira , so we need to create a issue key in jira or what?

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 15, 2021

@Arunraj 

If you want to have the build info displayed into a Jira issue development panel, then you need to have an existing issue in Jira (e.g. TEST-123) and you need to have the issue key (TEST-123) mentioned somewhere in the branch name and/or in the commit messages in the change-log of the build.

However, as mentioned in the Integrate Jira Software with Jenkins documentation page, you can also override this behavior and supply the list issue keys as an issueKeys parameter:

Specify custom logic to get issue keys

By default, the plugin extracts issue keys from all the commit messages in the change log of the build. It is possible to override this behavior to add your own logic and supply the list issue keys as an issueKeys parameter.

jiraSendDeploymentInfo site: '<sitename>.xyz.net', 
environmentId: 'us-prod1', environmentName: 'us-prod2', 
environmentType: 'production', issueKeys: ['DEV-001', 'DEV-002']

 

Please review the following links for more details:

 

 

In case you would like to create Jira issues from Jenkins instead, you may want to give a look at this other Jenkins plugin. However, please notice this is neither provided nor supported by us:

0 votes
Chandrapratap Singh September 7, 2023

@Dario B For jiraSendDeploymentInfo I am fetching the issueKey from the commit of my git branch which successfully updates the Deployment. 

But the same thing I want to do with jiraSendBuildInfo

Is there a way we can make use of issueKey for jiraSendBuildInfo as well?

Or is this mandatory to create a branch name with a Jira Ticket ID to send the BuildInfo?

0 votes
Arumugam Subramanian February 17, 2021

Hi, how we can send buildInfo from develop branch? We can't keep Jira id in develop branch. Please advise. 

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2021

Hello @Arumugam Subramanian ,

 

I believe that this is documented in: Integrate Jira Cloud with Jenkins

Specify custom logic to get issue keys

By default, the plugin extracts issue keys from all the commit messages in the change log of the build. It is possible to override this behavior to add your own logic and supply the list issue keys as an issueKeys parameter.

jiraSendDeploymentInfo site: '<sitename>.xyz.net', 
environmentId: 'us-prod1', environmentName: 'us-prod2', 
environmentType: 'production', issueKeys: ['DEV-001', 'DEV-002']

 

For more details on this topic, you may want to review below links:

 

Finally, for the future, please avoid adding a question to a thread that is already marked as resolved. Creating a new question would be the best way to go. 

 

Cheers,
Dario

Arunraj April 15, 2021

@Dario B In the above reply deployment info you were mentioned but I want build info only update in jira and the next one is issue keys first we need to create in jira and that issue keys we need to pass here or what?

project key I know but what is that issue keys?

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 15, 2021

@Arunraj

This is not the reply to your question, the reply to  your question is ABOVE and in there I have written:

If you want to have the build info displayed into a Jira issue development panel, then you need to have an existing issue in Jira ....

 

As regarding the issue key, you can find all the information in:

 

Also, as already mentioned in above reply:

Finally, for the future, please avoid adding a question to a thread that is already marked as resolved. Creating a new question would be the best way to go. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events