FEAT REQUEST: BITBUCKET_TRIGGER or similar variable in Pipelines

Issue #14926 open
Luke Batchelor
created an issue

I've noticed that BITBUCKET_BRANCH is not set when manually running a custom build (which probably makes sense really).

It would be nice if we had a variable we could use to check why a build was run ("manual", "scheduled", "commit", "REST", etc).

Comments (3)

  1. Aneita Yang staff
    • changed status to open

    Hi Luke,

    Thanks for your suggestion. Can you please help me to understand what your use case is for knowing the trigger type of a pipeline?

    I'll open up this issue to gauge the interest of other users on this feature. However, the team are currently working on higher priority features, so this is not something that you'll see in the near future.

  2. Luke Batchelor reporter

    Yea, no worries at all. Not blocking anything we are doing, just nice to have too much information than not enough.

    The specific use case that brought this up is a bit complicated, but essentially, its just so we can make informed decisions about how some of our custom builds should run.

    i.e we have a build that creates and pushes a staging version of our website. We have no problem with anyone manually or schedually(?) running that wherever they want. But we also have one that creates and pushes our production site, so we need to ensure it is only run in master and only from a scheduled build.

    At the same time, we dont want all the scheduled builds showing up in the pipelines UI for "master" builds, so we actually have to run that scheduled build on a separate (reserved) branch, that then checks out master.

    I dont think our specific use case will match too many other people, its just a case of having as much information as you can.

    I might raise a separate feature request to be able to filter out scheduled builds from the pipelines UI as well if that's okay (I was actually going to take a crack at writing it in Shippit but didnt get around to it!)

  3. Log in to comment