Hi folks,
I'm trying to use the parameter --rsync-path='sudo rsync' in the EXTRA_ARGS field. But I get caught with strange escapings. I tried escaping the single quote with '' (two single quotes). I tried double quotes within the single quoted string. Nothing works. What's wrong?
e.g.
- pipe: atlassian/rsync-deploy:0.2.0
variables:
USER: 'bitbucket'
SERVER: 'fe01.mydomain.de'
REMOTE_PATH: '/var/www/public/sandbox'
LOCAL_PATH: '.'
DEBUG: 'true'
EXTRA_ARGS: '-rzhv --delete --stats --rsync-path="sudo rsync" --exclude=/sandbox/ --exclude=/sandbox2/ --exclude=/test/ --exclude=/vanilla/ --exclude=/var/ --exclude=/web/ --exclude=/files/ --exclude=/media/ --exclude=/config.php --exclude=*.dist --exclude=/.git/ --exclude=/.bitbucket/'
Ends in
<span>INFO: Starting RSYNC deployment to <a href="http://fe01.gartenhaus-gmbh.de/" target="_blank" rel="noopener nofollow noreferrer">xxx.de</a>:/var/www/public/sandbox...</span><span>+ echo rsync -rp --delete-after -rzhv --delete --stats '--rsync-path="sudo' 'rsync"' --exclude=/sandbox/ --exclude=/sandbox2/ --exclude=/test/ --exclude=/vanilla/ --exclude=/var/ --exclude=/web/ --exclude=/files/ --exclude=/media/ --exclude=/config.php '--exclude=*.dist' --exclude=/.git/ --exclude=/.bitbucket/ . <a href="mailto:bitbucket@fe01.gartenhaus-gmbh.de" target="_blank" rel="noopener nofollow noreferrer">xxx@fxxx.de</a>:/var/www/public/sandbox</span><span>+ set +e</span><span>rsync -rp --delete-after -rzhv --delete --stats --rsync-path="sudo rsync" --exclude=/sandbox/ --exclude=/sandbox2/ --exclude=/test/ --exclude=/vanilla/ --exclude=/var/ --exclude=/web/ --exclude=/files/ --exclude=/media/ --exclude=/config.php --exclude=*.dist --exclude=/.git/ --exclude=/.bitbucket/ . <a href="mailto:bitbucket@fe01.gartenhaus-gmbh.de" target="_blank" rel="noopener nofollow noreferrer">xxxx@xxxx.de</a>:/var/www/public/sandbox</span><span>++ rsync -rp --delete-after -rzhv --delete --stats '--rsync-path="sudo' 'rsync"' --exclude=/sandbox/ --exclude=/sandbox2/ --exclude=/test/ --exclude=/vanilla/ --exclude=/var/ --exclude=/web/ --exclude=/files/ --exclude=/media/ --exclude=/config.php '--exclude=*.dist' --exclude=/.git/ --exclude=/.bitbucket/ . <a href="mailto:bitbucket@fe01.gartenhaus-gmbh.de" target="_blank" rel="noopener nofollow noreferrer">xxx@xxxx.de</a>:/var/www/public/sandbox</span><span>+ output='Warning: Permanently added the RSA host key for IP address '\''xx.99.xxx.89'\'' to the list of known hosts.</span><span>bash: -c: line 0: unexpected EOF while looking for matching `"'\''</span><span>bash: -c: line 1: syntax error: unexpected end of file</span><span>+ run rsync -rp --delete-after -rzhv --delete --stats '--rsync-path="sudo' 'rsync"' --exclude=/sandbox/ --exclude=/sandbox2/ --exclude=/test/ --exclude=/vanilla/ --exclude=/var/ --exclude=/web/ --exclude=/files/ --exclude=/media/ --exclude=/config.php '--exclude=*.dist' --exclude=/.git/ --exclude=/.bitbucket/ . <a href="mailto:bitbucket@fe01.gartenhaus-gmbh.de" target="_blank" rel="noopener nofollow noreferrer">xxx@xxxx.de</a>:/var/www/public/sandbox</span>