Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to pass JIRA current issue key in Jenkins pipeline script.

Hi Team,

We have to send Jenkins build status to JIRA ticket for currently selected JIRA ticket. We have to pass JIRA current issue key in Jenkins pipeline script. Currently its working for hard coded JIRA issue value(Ex: LPPAD-124) and its working absolutly fine. Now I need to pass the JIRA current ticket / issue nu,ber to the pipeline script. 


This Jenkinks, build is set up to trigger form JIRA, it is also working fien, Now need to fecth each Jira triggering get the current build status on the JIRA ticket. 



    post {

        always {


            jiraAddComment comment: "Job \'${JOB_NAME}\' build number (${BUILD_NUMBER}) is done and build status is ${currentBuild.currentResult} ,Please go to ${BUILD_URL}console and verify the build", idOrKey: 'LPPAD-124', site: 'jira_integration'


Here, instead of 'LPPAD-124', I need to pass the dynamic , current JIRA ticket value.  Please help me to fix  this. 




Thank you,

Dev G




2 answers

0 votes

Where are you writing and running this script?

Hi @Nic Brough -Adaptavist- ,

In Jenkins pipeline, I am writting this script. Its a shell script.





Thank you.

Ok, so how is it being triggered?



Hi Team,

Please repsond on this, its blocking our deliverables. 



Thanks in advance,

Dev G

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events