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
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
I know that I can set repository environment variable from repository setting,
but I need to change it's value inside my script and use it's new value some where else.
Is that possible?
my goal is sharing text message that is generated in build_script.sh to slack-notify message.
name: new publish
- echo "This step runs once you click the 'Run' button"
- /bin/sh build_script.sh
- pipe: atlassian/slack-notify:2.0.0
MESSAGE: '"$MESSAGE that is generated in build_script.sh "'
Hi @Mustafa Abdelhakam and welcome to the community!
Yes, this is possible. If you use a command like
- myVar="some text"
where myVar is a Repository variable, then the changed value will be used in the following commands of the same step. Please note that this will change the value of the variable for that specific step only, not for any other steps, and it won't change the value set in the Repository settings.
If you want to change the value of a variable in the Repository settings you can use the following API endpoint:
If you have any questions, please feel free to let me know.