Expose current build URL through an env variable

Issue #13344 resolved
Luke Batchelor created an issue

Just a small nice to have that would make our build a little nicer.

If we could access the url of the currently running build from an env variable we'd be able to make the notifications that go to our team room, be able to link to the build that caused it.

Comments (10)

  1. Luke Batchelor reporter

    Actually, thinking about it, a link to the PR that kicked off a build would be the most useful thing. Then we have links to everything from there.

  2. Joshua Tjhin Account Deactivated
    • changed status to open

    Hey Luke,

    Thanks for the feedback. This is something we can add. Out of curiosity, how have you set up sending notifications to your team room? Are you using a tool like Slack or HipChat?

  3. Luke Batchelor reporter

    We used to have a shell script that someone made ages ago for AUI, it looks like we use

    const HipChatNotifier = require('hipchat-msg').HipChatNotifier;


  4. Philip Hodder staff

    It is backwards compatible, both URLs map to the same pipeline. Build number URL is just cleaner to look at. :)

  5. Matt Ryall
    • edited description
    • changed status to resolved

    We now expose the build number (as BITBUCKET_BUILD_NUMBER) which is the variable part of the Pipelines URL. I think this covers off this use case sufficiently for now, given the low interest in this issue.

  6. Log in to comment