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.
Hi,
I setup repository variables NOT as secured, and don't have any deployment or workspace variables.
When I try to run this pipeline:
pipelines:
default:
- step:
name: Build and deploy front-end
image: node:16.9.1
script:
- echo $API_DOMAI
- echo 'VAR_FROM_BITBUCKET=$API_DOMAIN' > .env.production.local
- rsync -a -e 'ssh -p $PORT' $BITBUCKET_CLONE_DIR/dist/ $USER@$HOST:$DEPLOYMENT_DIR/frontend
The pipeline only replaces the variable in the fist echo but not the other command.
Why the variables not working in the rsync command and a quoted echo?
The $BITBUCKET_CLONE_DIR variable working fine in rsync.
Am I doing something wrong? This is driving me crazy!
Hi Dávid,
Thank you for contacting Atlassian Community. My name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet you! Welcome to the Atlassian Community.
I'd like to inform you that in case you want this to work, please change your script to the following:
echo 'VAR_FROM_BITBUCKET='"$API_DOMAI" >> .env.production.local
Please let me know if it's working for you.
Have a great day!
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.