grunt-drupal-tasks
grunt-drupal-tasks copied to clipboard
Add rsync option to package command and improve performance
This is a fairly significant patch, but should not affect existing projects. It adds a "packages.rsync" option (False by default). When set to true, the package will be generated in a separate folder (packages.vmData defaults to "build/vm_data") via rsync and the compress option is enabled to generate an archive from the package, which is moved to the normal build/packages destination.
By mounting build/vm_data into the VM in your docker_composer.yml file, this allows the package to be built directly to the VM bypassing NFS to the local filesystem. Only the final archive.tgz is moved into the local file system. The vmData persists so the Build container can still perform additional tasks as needed, such as pushing the package into a remote repo. Or, the local tgz archive can be used to deploy the package.
On a current real project, this reduced the normal "grunt package" command running from the build container from a 40-minute task, down to a TWO minute task.
Given the significant performance improvement, I'm marking this PR for Milestone 1, so let's get reviews of this approach. (FYI it was modeled from some code in a "grunt deploy" task written for another project by Adam)
FYI: Travis tests are failing because of https://github.com/phase2/grunt-drupal-tasks/issues/304 and not because of anything in this PR.
@mike-potter Could we target this for a 1.1.0 milestone? I think the current master version is in good shape for a rc1 release and a stable one after a bit of testing.
Sure, we can do 1.1.0. I agree that we need to get 1.0.0 released so people can start using the composer-based support. And adding the "tempdir" option probably opens up other issues we'd want to work on for improving performance elsewhere in GDT that could benefit.