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 ‘

Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119
Company News
Announcing social enterprise discounts: Atlassian tools for social impact teams

Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119
Leadership
Great managers meet uncertainty with curiosity and confidence

Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119
Company News
Introducing Databricks Query Runner: Transforming data into insight

Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119
Company News
Team ’25 Europe: AI that’s changing the game for teams

More Collections


Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119

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


Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119

Introducing Atlassian Software Collection


Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119

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