You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm wondering if there is a way to do:
```yaml
Hello @Paul Helter ,
Thank you for reaching out to Atlassian Community!
I'm afraid that at this moment it's not possible to define environment variables at step level. We already have a feature request to implement that functionality, though :
I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with this policy in mind.
While this feature is not implemented, a workaround-ishy way of having different values for the same variable is to define different deployment environments , create the deployment variables in each deployment environment, and then assign a different deployment to each step, like the below example :
pipelines:
default:
- step:
name: Deploy to Test
deployment: env1
script:
- echo $DEPLOYMENT_VARIABLE
- step:
name: Deploy to Test
deployment: env2
script:
- echo $DEPLOYMENT_VARIABLE
So, although the environment variable name is the same, you can set different values to it for each deployment environment.
Hope that helps! Let me know if you have any questions.
Thank you, @Paul Helter .
Kind regards,
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.