Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,461,963
Community Members
 
Community Events
176
Community Groups

Repository variables not working in "complex" command

Edited

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!

1 answer

0 votes
Norbert C Atlassian Team Jan 26, 2022

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

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events