Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,371
Community Members
 
Community Events
184
Community Groups

Unable to get Deployment Variables

My project uses a mix of Repository and Deployments variables. Repository variables are being fetched correctly but there is something wrong with deployment vars for each pipeline. Below I'm attaching my bitbucket-pipelines.yaml file and a setup in Repository settings -> Deployments

Echo script were only to check if the values are being passed. 

BITBUCKET_DEPLOYMENT_ENVIRONMENT was empty while the rest were present in a 
my_variables file
Screenshot 2023-05-01 at 14.30.05.png
Screenshot 2023-05-01 at 14.36.18.png

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 02, 2023

Hi @Oskar Kuklinski and welcome to the community!

I believe that the variable is empty because the syntax of the step is incorrect.

The following line can be used if you don't want to specify any additional values, like the step name and deployment environment.

- step: *env-specific-build-and-deploy

If you want to specify a different step name and deployment environment, the step should look as follows:

- step: 
<<: *env-specific-build-and-deploy
name: Some name
deployment: stage

The step in the master branch pipeline needs to have a similar definition as well.

This is the documentation for reference (see section Override values)

Could you give it a try and let me know if it works for you?

Kind regards,
Theodora

Hi @Theodora Boudale and thanks for looking into it!

Unfortunately after making a change mentioned above I am getting following error when running a pipeline (nothing else in console logs):

Screenshot 2023-05-02 at 13.22.37.png

Any idea why this could be happening? Also attaching updated bitbucket-pipelines.yaml file

Screenshot 2023-05-02 at 13.24.32.png

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 02, 2023

Hi @Oskar Kuklinski,

I think the error occurs because of the indentation.

See my example:

- step: 
<<: *env-specific-build-and-deploy
name: Some name
deployment: stage

For the lines below -step: I am using 4 spaces for indentation. In your yml file, it looks like the indentation is 2 spaces instead, which I believe is the reason for this error.

Kind regards,
Theodora

Yes, that was indentation issue. Thanks for your help, pipeline runs successfully now!

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 02, 2023

You are very welcome Oskar, I'm glad to have helped!

Please feel free to reach out if you ever need anything else!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events