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 trying to access a variable (unsecured) in a script to create a .env file before building, but the file is always created empty. The plan is to base64 decode it, but right now I'm just trying to access it at all. As far as I can read only secured variables should be restricted. What am I missing?
Screenshots below
Thanks!
script:
- echo $ENV_FILE > .env.local
- cat .env.local
- yarn install
- yarn build
Hi Chris,
Thanks for reaching out to Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!
This sounds interesting, can you try to do only the "echo $ENV_FILE" command and let me know whether if it shows the environmental variable? Also, can you let me know if you're using Runners or are you running it on our Pipelines infrastructure?
Please let me know.
Best Regards,
Norbert
Atlassian Bitbucket Cloud Support
Hi Norbert,
I figured it out myself eventually - this was a deployment level variable which I didn't realise would not be available in non-deployment steps. I have moved it to a repository level variable which is now working.
Thanks for he reply
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chris,
Thank you for your reply, I'm glad to hear your issue is resolved :).
Have a lovely weekend ahead and stay safe!
Best Regards,
Norbert
Atlassian Bitbucket Cloud Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.