Predefine values of custom pipeline variables

Recently, we introduced support for default values in custom pipeline variables. Today, we’re happy to announce the ability to make pipeline variables configuration more flexible with predefined values.

We added a property to predefine values that can be assigned to a variable. It helps avoid errors, and improves the user experience. Instead of typing a variable value, you can choose it from a dropdown.

Here is an example of a pipeline configuration with the allowed-values property showing how to restrict values for an environment variable:

pipelines:
  custom:
    run-test-for-environment:
      - variables:
          - name: Environment
            default: production  
            allowed-values:         # optionally restrict variable values
             - dev
             - staging
             - production
      - step: 
          script:
            - echo "environment is $Environment"

Now, in the “Run pipeline” dialog, the user will have to choose a variable from a predefined list.

Additional documentation on using variables in custom pipelines can be found here. We hope you and your team find this extra flexibility helpful! 

Happy coding!

Published

in

Related Content

More in ‘
Company News

Announcing social enterprise discounts: Atlassian tools for social impact teams

Leadership

Great managers meet uncertainty with curiosity and confidence

Company News

Introducing Databricks Query Runner: Transforming data into insight

Company News

Team ’25 Europe: AI that’s changing the game for teams


More Collections

Meet Rovo everywhere: AI that connects every app, every team, every workflow

Introducing Atlassian Software Collection

Move Faster and Work Smarter with Atlassian’s AI-Powered Teamwork Collection