My build step includes different ENV variables for different environments. I can setup different variables using "deployment variables" but I am not able use them during build step. If I use repo variables I can not build for different env. Is there a way to specify different set of variables for builds? Thanks.
you can access deployment variables in the same way you access other variables, with a dollar sign in front. However, deployment variables are only available if that step also has a deployment configured. Here is a sample pipeline that uses a deployment variable:
- echo $MY_VARIABLE
And then configure the deployment variable like this in the deployments settings:
For the purpose of this test make sure it is unsecured. Secured variables can not be echoed in the build logs, you should use that feature for access credentials and other secret information.
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
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