How to pass custom field values of a JIRA ticket to a CI/CD tool like Jenkins

degan May 21, 2021

I am trying to create a workflow where a user would create a JIRA ticket. When the JIRA ticket is created, the flow would then pass certain field values from JIRA to a CI/CD tool like Jenkins where Jenkins would run a job using these field values (Jenkins would run a script and this script would use these field values). Has anyone got any guidance on how to do this please? I see someone has already asked this question many years ago and it was never answered: https://community.atlassian.com/t5/Jira-questions/How-to-pass-custom-field-value-in-JIRA-Webhooks-URL/qaq-p/405347

Many Thanks!

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2021

Hello Degan and welcome to the Community!

This is a very interesting idea indeed. I do have concerns with security since you're auto triggering actions based on possible random input (ensure you use a validator before triggering), but with that aside you may have a path forward, though it may not be easy.

Ideally, you're wanting to ensure some type of validation limited selection of variables to pass through within your CI/CD workflow. You may want to explore a combination of Jira advanced issue workflows, Jira webhooks, and possibly the use of Jira automation. While we don't have an exact solution for your ask, we would suggest reviewing the following to explore options:

Additionally, there may also be options within the marketplace to allow for additional scripting and automation tasks, I found a similar post about call external rest api using post function, which may help to explore automation options.

I hope this information proves helpful.

Regards,
Stephen Sifers

degan May 27, 2021

Hi Stephen,

Thank you for the warm welcome and a massive thank you for the detailed information you provided.

I will give these a read and try work out the best solution for my needs.

Thank you very much.

Kind Regards,

Dean

Like Stephen Sifers likes this
gnanavelu_murthy January 6, 2022

Hi @degan ,

 

My requirement also similar this, do you got any solution for how to achieve this in JIRA cloud.

Thanks & Regards

Gnanavelu

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events