Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Bitbucket Pipelines Templating DRY Not working



I want to use bitbucket DRY feature with yaml anchors. 

- step: *build

- step: &build
image: openjdk:11.0-jdk-buster
name: Build and test vol di
- date +%Y-%m-%d_%H%M > bld_date
- bld_date

I get:


Screenshot 2022-01-06 at 15.36.41.png


What I am doing wrong?

1 answer

0 votes
Norbert C Atlassian Team Jan 07, 2022

Hi Janis,

Thank you for contacting Atlassian Community. My name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet you! Welcome to the Atlassian Community :)

Based on my observation, you have the "definition" part after the "pipelines" part. Can I ask you to move the "definition" part above the "pipelines" part and let me know if that makes any difference, please?

Pipelines need to know the "definition" part first, before it can initiate the "pipelines" part, I suspect that's the reason why it's failing. In case it's still not working, can I ask you to share the your bitbucket-pipelines.yml file with us masking all the private/confidential information so that I can review your configuration?

I'm looking forward to hear from you.

Best Regards,
Atlassian Bitbucket Cloud Support

Suggest an answer

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

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

110 views 2 4
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