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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

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_DEV- dev

USER_PROD - prod

 

deployment 

  • Dev
    • USER = USER_DEV
  • Prod
    • USER = USER_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,
Theodora

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 https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html and any updates are posted in the feature request.

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

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

641 views 10 16
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