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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,553,467
Community Members
 
Community Events
184
Community Groups

Jenkins JOB ID in pipe: atlassian/jenkins-job-trigger:0.1.2

Hello Team,

We are integrating Bitbucket with Jenkins and using the pipe.

Is there a way to pull the Job ID once the execution is completed so that i can construct the URL and put it in Bitbucket CI console output.

pipe: atlassian/jenkins-job-trigger:0.1.2

            variables:

              JENKINS_URL: $JENKINS_URL

              JENKINS_USER: '$JENKINS_USERNAME'

              JENKINS_TOKEN: $JENKINS_USER_TOKEN

              JOB_NAME: 'job/$MY_JOB_NAME/job/main'

              WAIT: 'true'

              WAIT_MAX_TIME: 500

              Debug: 'true'

 

Here once everything runs i am getting the Job {jobID} is triggered. But i need to get this JOB ID in a separate variable so that i can construct the URL and echo that in BB CI

 

1 answer

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 23, 2022

@Sarath Nagarajan  hi. First of all, please use the latest version of the pipe.

 

We have no clarification of Job ID in our pipe. We use build number of the job, is this what you need to construct your url?


Answering to your question, you could create your custom pipe based on jenkins-job-trigger, where you could fetch  this url  into some file as artifact, and after this parse artifact for your needed data.

Will this cover your case?

Guide of how to create your custom pipe

Regards, Igor

Suggest an answer

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

Atlassian Community Events