Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

It is possible to override a variables inside a pipeline YAML anchor?

Following the official documentation for YAML anchors:, a question arises.

Since it is possible to make substitutions within a step, such as injecting a new name to the step. Is it possible to somehow inject a new value for a variable? Please see my example below to better explain my question.

-step: &my-step
name: 'I want to replace this and I can'
- export TO_BE_CHANGED='I want to replace this and I can not'

<<: *my-step
name: 'Injecting new name'
$TO_BE_CHANGED = 'Injecting new value'

Is there any way to modify the value of the variable TO_BE_CHANGED?


Thank you

1 answer

0 votes

@Fernando Arteaga We don't currently support overriding variables. Have you considered using deployment environments to override variables?

I am working on the CI side for now, and I am not looking for automating the deployments yet.

Although I think it could be a super nice feature to override more things inside the definitions. It really could help to reduce the size of the bitbucket-pipelines.yml file and improve the code's reusability.

Thank you for the answer

Like Justin Thomas likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

366 views 2 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you