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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.