Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to hit jira api from jenkins

Gereth Dittrick
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 13, 2019

getting 

No JIRA site configured with <URL_HERE> name.

when running 

jiraAddComment site: '<URL_HERE>', idOrKey: 'ticketId', input: "test comment"

 

1 answer

0 votes
Hana Kučerová
Community Champion
November 13, 2019

Hi @Gereth Dittrick,

is it correct, that you are using JIRA Pipeline Steps plugin?

 

Do you have the possibility to check authentication configuration in Jenkins?

https://jenkinsci.github.io/jira-steps-plugin/getting-started/config/authentication/

You can also perform the connection check from the configuration site (using Test connection button).

 

The parameter site is optional - is it neccessary to override global JIRA_SITE variable? Did you try to skip it?

Gereth Dittrick
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 14, 2019

Hello Hana, yes this is the Jira Steps Plugin. The test connect button shows a successful connection but when trying to invoke the plugin with a job i get the above error. I did try omitting the site variable but the JIRA_SITE env variable is empty/null with the specific error

ERROR: No JIRA site configured with null name.
Hana Kučerová
Community Champion
November 14, 2019

Hi @Gereth Dittrick ,

I would recommend you to contact the vendor of the Jira Steps Plugin, described behaviour looks like a bug to me.

Maksim Seleverstov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 1, 2021

If the problem is still relevant, try using the following script in Jenkinspipeline to contact JIRA and make comment to Issue TSP-26:

script {
  withEnv(['JIRA_SITE=JIRA-Test']) {
  def comment = [ body: 'Test comment from Jenkins' ]
  jiraAddComment idOrKey: 'TSP-26', input: comment
}

where JIRA_SITE=JIRA-Test is predefined Jira site in Jenkins system settings:

2021-02-02_073428.png

Like # people like this

Suggest an answer

Log in or Sign up to answer