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,457,346
Community Members
 
Community Events
176
Community Groups

How do I get the latest pipeline UUID's from the Bitbucket api

Edited
Deleted user Jul 15, 2022

I'm trying to get the latest pipeline build status for a slack webhook. In order to do that, I need to get the latest pipeline ID from the API.

 

I tried doing this in a bitbucket-pipelines.yml file (for the current running pipeline to then send a slack notification) using the $BITBUCKET_PIPELINE_UUID default variable but it keeps returning null. Maybe it returns null because the pipeline isnt finished yet?

1 answer

0 votes
Ben Atlassian Team Jul 17, 2022

Hey Rinesa,

I have tested this on my own Bitbucket Cloud repository by echoing the $BITBUCKET_PIPELINE_UUID during the build process (ie within the script portion of the build) and this returns the correct UUID without issue.

The Pipeline UUID will only return a value once the agent process has finished executing (ie once the initial build setup begins) so it must be gathered during this time.
The UUID can also be gathered from the browser if you know the Pipeline number (which is found in the URL of the pipeline):

https://bitbucket.org/!api/2.0/repositories/workspaceID/reposlug/pipelines/pipelineNo/steps/

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events