Skip to content

Rsync options in Continuous Delivery context

Michele Franzin edited this page Dec 2, 2019 · 2 revisions

Wordmove by default will use rsync with -rlpt options. In a Continuous Delivery context these options are not always the best:

  • --recursive 👍
  • --links 👍
  • --perms 🤷‍♂
  • --times 👎

While --perms is completely bound to your specific needs, --times will always trigger updates, since on a CI/CD docker container the files will be always created from scratch and their times will be always the freshest.

Personally on a CD container I've managed to achieve a good results with this:

rsync_options: '--itemize-changes --chmod=D775,F664 --no-perms --no-times --checksum'

The --chmod flag is to be tuned, but I think it should be there since you have --no-perms but you want to have control over what you're pushing live, isn't it true?

--no-perms and --no-times will disable the default wordmove's flags and --checksum will enable the checksum based diff algorithm. This algorithm will be slower, but will ignore file times and permissions and will be sure to invoke a transfer if a file content does not match exactly between local (here local is a docker container run on a CD environment...but it's always the local for Wordmove 😄 ) and remote.

This is not a "on size fits all" solution, but still a nice one and hopefully useful for others!