Forums

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

How to specify multiple Jenkins jobs url in JIRA webhook

Ashok.T.R.
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!
March 3, 2020

Hi , i have multiple jenkins job, each one is associated with JIRA issue status change.

(ex) "Dev deployment" jenkins job configured as if i change status of an JIRA issue from "TO DO" to "Dev deployment" , "Dev deployment" jenkins job has to be triggered through JIRA webhook.

Like that i have multiple jenkins jobs for each status changes in JIRA issue. 

My question is how to mention the jenkins jobs url in JIRA webhooks?

(ex) i mentioned https://JENKINSURL/jira-trigger-webhook-receiver/ in JIRA webhook.

can't i use the same url in webhooks for all my jenkins jobs?

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 17, 2020

Hello @Ashok.T.R. ,

If I understand correctly, you are asking if you can configure multiple URLs in the same Webhook in Jira. If this is the case then the answer is no: you can only have one URL per Webhook in Jira.

 

However, even if I am not that familiar with Jenkins, I don't think having the possibility to set multiple URLs in a Webhook will be of any help in your case since you need to trigger different jobs for different transitions, like explained below:

  • For each Jenkins job to be called, the URL would be something like: http(s)://username:api_token@Jenkins_URL/job/job_name/build?token=TOKEN
  • Therefore in Jira you will have a Webhook for each job you have to trigger in Jenkins (as already mentioned, you can configure only 1 URL per Webhook)
  • So, in your workflow, any transition that should trigger a job in Jenkins will have a post function that will call the respective Webhook for that job.

Having multiple URLs in the same Webhook instead, would trigger all the jobs for each transition.

 

For further details please see:

 

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer