Hi,
I'm trying to deploy the content of a Bitbucket repo on a server using rsync. I followed the documentation and used the rsnyc-deploy pipeline to do that. Everythin works fine, except the whole destination directory is wiped before the source (the repo) is copied over.
I would like to keep the content in the destination directory and just update the modified files from my repo.
Example :
The repo contains various wordpress plugins and themes (wp-content/plugins/xxx/ and wp-content/themes/xxx). The server's public_html folder contains wp-admin/, wp-includes/, various .php files, and I don't want them to be deleted after each push on the repo.
I managed to find the working rsync command from my terminal to achieve what I want :
rsync -avz —update -e 'ssh -p $SSH_PORT' . $USER@$SERVER:$REMOTE_PATH
But I can't reproduce the same behaviour in my pipeline (showing only the relevant part, the rest is pretty much basic pipeline boilerplate) :
- pipe: atlassian/rsync-deploy:0.13.0
variables:
USER: '$USER'
SERVER: '$SERVER'
REMOTE_PATH: '$REMOTE_PATH'
LOCAL_PATH: '.'
SSH_PORT: '$SSH_PORT'
EXTRA_ARGS:
- '-avz'
- '--update'
DEBUG: 'true'
The $REMOTE_PATH has a trailing slash, but in my tests it does the same things without.
Have anyone had the same problem and knows a fix?
Thank you for your help!