Default value of custom variable is not picked up for builds triggered by git push

mihai onoprienco September 15, 2023

regarding this feature:

https://community.atlassian.com/t5/Bitbucket-articles/Bitbucket-Pipelines-Predefine-values-of-custom-pipeline/ba-p/1938188

PROBLEM FOUND: the default value is not set when the pipeline is triggered by a new code push. The value ( default or the picked one ) is only set when the pipeline is manually triggered.

Below is a snippet from used pipeline:

pipelines:
  custom:
    compile-and-publish:
      - variables:          
          - name: profile
            default: dev
            allowed-values:
             - dev
             - prod
             - test
          - name: isGA
            default: 'no'
      - step: *compile

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 18, 2023

Hi Mihai,

Variables defined this way are available only for custom pipelines:

Custom pipelines do not get triggered automatically when you do a git push, so I'm a bit confused about the problem you are reporting.

Have you perhaps defined such variables in a pipeline other than custom, e.g. a branch pipeline or the default pipeline?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events