Can I create Jira Issue for Cloud with Jenkins ?

Ergin İpekçi October 7, 2019

I tried to connect Jira Cloud and Jenkins. I'm using Jira plugin for create issue bu it didn't work. And it doesn't show issue priority.

 Are there different way to create issue and assign somebody from Jenkisnt to Jira Cloud? Can you help me?

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2019

Hi @Ergin İpekçi ,

Can you kindly let us know which app are you using, the official Jenkins for Jira or anything else?

I am asking because the official Jenkins for Jira is only intended to be used to connect and send build and deployment information from your Jenkins server to your Jira Software Cloud site or to trigger builds based on issue changes. Please review below links for details:

 

 

By searching our marketplace as well as Jenkins plugins index I have found the below ones that should allow to create issues in Jira:

 

Therefore, please let us know:

  1. If you are using one of the above plugins (specify which one) or anything else.
  2. What is not working as expected, the steps you follow to reproduce the issue, if you get any error message, etc (provide as many details as possible).

 

 

Cheers,
Dario

Ergin İpekçi October 9, 2019

Hi @Dario B , thanks for your answer. I tried to  use Jenkins Jira plugin. 

It was exactly what I was looking for. I configured the settings but it doesn't show issue priority and issue type. And it doesn't create issue on Jira. There isn't log on console output on Jenkins. I use Jira Cloud and Jenkins Server. What can be the problem? 

jiraplugin.png

jirasettings.png

I haven't used Jenkins Integration Automation for Jira yet. I will try that.

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 10, 2019

Hi @Ergin İpekçi ,

Having Jenkins hosted locally should not be a problem as long as:

  • it is reachable from the Internet
  • it is using standard ports (80 or 443) -> not sure this is a requirement anymore since apparently it has been removed from the documentation. I will have to check.
  • The account configured in the provided screenshot has proper rights to create issues in the specified project.
  • You use email address and API Token to authenticate instead of username and password (basic authentication with username and password has been deprecated. See: Deprecation notice - Basic authentication with passwords and cookie-based authentication for details

 

However, have you reviewed the below section of the add-on documentation page?

JIRA Authentication & Permissions required

Note: As a rule of thumb, you should be always using a service account (instead of a personal account) to integrate Jenkins with JIRA.

Make sure that the JIRA user used by Jenkins has enough permissions to execute its actions. You can do that via JIRA Permission Helper tool.

  • For creating JIRA issues, the user has to be able to Create Issues in the specified project
  • If you additionally enter assignee or component field values, make sure that:
    • both of the fields are assigned to the corresponding JIRA Screen
    • the JIRA user is Assignable in the project
    • the Jenkins JIRA user can Assign issues
JIRA Cloud

In Atlassian JIRA Cloud, it's not possible to create a user without an email, so you need to create API token.

Then create a global Jenkins credential, where you put Atlassian ID email as username and API token as password.

You can check if your API token works correctly by getting a correct JSON issue response with this command (where TEST-1 is an example issue in your project):

$ curl -X GET -u <email>:<API token> -H "Content-Type: application/json"  https://<YourCloudInstanceName>.atlassian.net/rest/api/latest/issue/TEST-1

Also make sure that CAPTCHA is not triggered for your user as this will prevent the API token to work - see  target=_blankCAPTCHA section in Atlassian REST API documentation.

 

Please go through the above text, run the tests and let me know if it helps.

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer