Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It is posible to get URL to current pipeline execution in Bitbucket Pipelines?

Every pipeline execution has their own URL (I think is a kind of UUID?).

It's possible to get that URL or UUID to compose the URL?

I have a command inside my tasks triggering messages using a REST/API call, but I want to include a link to the pipeline that triggered the message.

like image 657
Gonzalo Avatar asked Jun 16 '17 21:06

Gonzalo


1 Answers

You can try doing it with default variables in pipelines. The ones you need are:

  • $BITBUCKET_GIT_HTTP_ORIGIN - the URL for the origin (e.g. http://bitbucket.org/<account>/<repo>).

  • $BITBUCKET_BUILD_NUMBER - the unique identifier for your build.


For the time of writing this answer, the following combination works:

$BITBUCKET_GIT_HTTP_ORIGIN/addon/pipelines/home#!/results/$BITBUCKET_BUILD_NUMBER
like image 186
Michal Karbownik Avatar answered Sep 21 '22 13:09

Michal Karbownik