Start jenkins job from JIRA

Hi,

I'm looking for a way to start a Jenkins job from Jira. The idea is for the job to be triggered by a Jira workflow status transition. This job isn't the first one in the pipeline, what i mean is that this is a downstream job, which has also more downstream jobs that should be triggered. What's the best way to do it?

Thanks!

1 answer

I have implemented this in 2 different ways (my 2nd option is what you want but take a look at my 1st option)

1) Use SCM Polling: This is ideal for a repository with a large user base where doing continuous builds is a nightmare. (My team host 4200~ SVN/GIT repos combined and one specific repo have 1,800 developers on it). We have setup a build time every 3:00pm where all tickets with "custom field Build Request = Yes" will be included in the build.

2) Use a Post Function Script - I have setup a project with a post-function that will run a script (I used groovy) that will POST to the Jenkins URL. My Jenkins project is using buildToken for authentication. You can also use shell script if you want, just curl POST to the jenkins URL then you are good to go.

Both of these assuming that your SVN/GIT Repository is integrated with JIRA and your Jenkins instance has the JIRA Plugin installed.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,211 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot