You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I've noticed that some of the standard Bitbucket Pipes define some or all of the variables for the pipe within their pipe.yml file. Searching the project shows that (as of today) 14 of the 53 repositories in the Bitbucket Pipelines Pipes project have defined variables in the pipe.yml file.
However, the pipe.yml specification in the Write a pipe for Bitbucket Pipelines article does not provide any documentation for the "variables:" keyword, its specification, or its function.
Is there a reason to declare variables in the pipe.yml of a Bitbucket Pipe? What does this accomplish? Is there functionality made available by declaring variables in the pipe.yml that is not available through merely consuming provided variables in the main script of the pipe? Is this a deprecated feature?
EDIT: A coworker pointed out a blog post from December 2019 that discusses this feature as a way of implementing default variables. However, this feature does not appear to be documented in any of the official documentation. Is this intentional?
@oobug hi. Thanks for question.
We will update this page.
Answering to your question, you can provide or not default variables in pipe.yml, it's up to you.
Example with variables:
name: My demo pipe
...
variables:
- name: ENV_NAME
default: 'Production'
- name: SECRET_KEY
default: '${SECRET_KEY}'
...
Regards, Igor.
To confirm, does that Updates to Bitbucket Pipes blog post accurately describe the functionality of declaring variables in the pipe.yml? That is, it's for the purpose of declaring default values for variables in the pipe?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.