Hello,
I am using rsync pipeline to deploy to my server, but it happens that essential information like the content is being replaced by the dummy content I have in my local.
Hi @Marcos Almeida ,
You can use the EXTRA_ARGS parameter to pass in the "filter" and/or "exclude" parameter to rsync. For example
script: - pipe: atlassian/rsync-deploy:0.12.0 variables: USER: 'ec2-user' SERVER: '127.0.0.1' REMOTE_PATH: '/var/www/build/' LOCAL_PATH: 'build' DEBUG: 'true' EXTRA_ARGS: - "--filter=P assets/css" # double quotes here are necessary - "--exclude=*.txt"
Hope that helps!
Also, if you want the contents of .gitignore to be ignored, you will have to use
--exclude-from=.gitignore
in the EXTRA_ARGS section.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Hariharan Iyer
Thanks a lot for the fast answer.
It drives me to another question: Filter or exclude flags would drive me to the same, not touching my folders on the server?
Would it look like this?
EXTRA_ARGS: - "--filter=P content"
--exclude-from=.gitignore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, using excludes (or exclude-from) in rsync implies that files which match those patterns will not be sync'ed, so the versions on your server should not be affected. You can learn more about how/when to use the various options here - https://manpages.ubuntu.com/manpages/trusty/en/man1/rsync.1.html#filter%20rules
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.