Hi, I just set up a pipeline with rsync pipe. The code looks like this:
- pipe: atlassian/rsync-deploy:0.4.2
- apt-get update -y
- apt-get install -y ssh
- ssh email@example.com "sudo chmod -R 755 /someuri/htdocs/ && sudo chmod -R 775 /someuri/htdocs/wp-content/ && sudo chown -R myuser:group /someuri/htdocs/"
I have 2 issues here and ask for your kind advice:
1. As the USER and SERVER variables are already declared above, is there a way to use them in ssh statement below?
2. For some reason, rsync changes owner and permissions to my files in the remote host. I thought passing EXTRA_ARGS: -avz would help, but it did not. Any thoughts?
Q1 - I don't know of a way of using the variables from within the pipe, but you could define your variables before the call to the pipe and re-use them that way:
- pipe: Atlassian/rsync-deploy:0.4.2
- ssh $USER@$SERVER "sudo chmod -R 755 $URI/ && sudo chmod -R 775 $URI/wp-content/ && sudo chown -R myuser:group $URI/
Q2 - I don't know.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events