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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


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
Community Members
Community Events
Community Groups

Set deployment variables from environment variable

It is possible to define at etch deployment same variable with different values that defined at environment variable


For example:

environment variables:


USER_PROD - prod



  • Dev
  • Prod


So the pipeline echo will prints for deployment 

  • Dev $USER  is  dev
  • PROD $USER is prod

1 answer

1 accepted

0 votes
Answer accepted

Hi Maxim,

I assume that USER_DEV and USER_PROD are either workspace or repository variables?

I'm afraid that it is not possible to use the value of workspace or repository variables when you define deployment variables.

You can do so during the build if you include a command in the yml file, but it is not possible to reference another variable when you define them in the Repository settings > Deployments.

May I ask why that would be useful, instead of specifying the actual value in the deployment variables? I believe we have a feature request for this which was closed due to inactivity, but I can reopen and add an explanation on why this would be a useful feature.

Kind regards,

if i define them as  workspace variables then other users of  bitbucket can use them as variables and their combination.
then when user ID or HOST changed i can update only at workspace and not at every repository pipeline.

Hi Maxim,

Thank you for your reply.

I went ahead and reopened the feature request, I also added your use case and feedback for our product managers to take into account.

You can find it here:

I would suggest to add your vote there (by selecting the Vote for this issue link). You are more than welcome to leave any additional feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy here and any updates are posted in the feature request.

Please feel free to let me know if you have any questions.

Kind regards,

Year late, but this is also something we'd like.   We use common variables across our multiple repos, but they're only common within the environment.  Being able to set Access Keys/Secrets in the Workspace, and then call them in the deployment means we only would need to update a password or key in the Workspace and have it automatically flow down.





Suggest an answer

Log in or Sign up to answer

Atlassian Community Events