Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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!


Get the pipeline triggered URL


I'm using

Once the pipe is running I can find inside the logs the pipeline ID which is running now.
is there a way to get the triggered URL pipeline (the process that is being triggered) as an environment variable or middle script that can use steps or pipes to use this URL and send it to slack or post it into some PR as a comment?


Repo A - Sanity testing repo

Repo B - Production product
Once I'm opening a PR inside Repo B, my pipeline is configured to run:
Install, build, deploy demo env, unit testing, and trigger a pipeline on Repo A (Sanity testing)
There is a way to get the URL from the triggered task and for instance add a comment to Repo's B PR the URL that is being running ? instead of digging in the step logs?

1 answer

2 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 24, 2023

Hello @Naor Zveda ,

thanks for reaching out to Bitbucket Cloud Community!

Unfortunately, the pipe atlassian/trigger-pipeline does not currently share the build URL or the build ID with the build container once the pipe completes its execution. That information is currently available only within the pipe's container.

However, since atlassian pipe repositories are public, you have the option to fork the pipe atlassian/trigger-pipeline and do some custom modifications on the pipe's script to cover your use case. Bitbucket Pipelines offer the built-in variables BITBUCKET_PIPE_STORAGE_DIR and BITBUCKET_PIPE_SHARED_STORAGE_DIR that can be used to share state/data between pipes or between the pipe and a step, so you could change the pipe's script to save the build URL to a file inside those directories, and once the pipe is finished you can then get the content of the file in your step's script.

For further details and examples on how to share that information between the pipe and the step you may refer to the following article :

With the build ID in hands, the API endpoint Create a comment in a Pull Request can be used to post this information as a comment in a Pull Request.

Hope that helps! Let me know in case you have any questions.

Thank you, @Naor Zveda !

Patrik S

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events