You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've read the docs and followed them (if applicable)
This is not a personal support request that should be posted on the Roots Discourse forums
Background
I have one Vagrant box to manage multiple sites (around ~25). I have refrained from using deploy hooks (mainly build_before) since I have customized build workflows between different sites and at the moment, deploy hooks are applied to all sites within one Trellis instance.
I would like to have the possibility to have customized deploy hooks per site. It would ideally look something along the lines of build-before-site1.com.yml and allow me to create new deploy files if necessary that are customized to each site.
Example
site1.com uses gulp to build my assets
site2.com uses webpack to build my assets
site3.com does not have a need for a build workflow
Problem
If a site does not have a deploy hook file (e.g. build-before-site3.com.yml), deploying via Ansible will fail saying that the file is missing. I could probably create an empty file to bypass the error but I have another suggestion.
Feature Request
What I have that is working
I have changed roles/deploy/tasks/build.yml and added a check to make sure that the deploy_build_before file (referenced in deploy.yml) exists and added a when statement to only run the deploy-hook if it exists.
And it will give me the opportunity to have a file in the deploy-hooks folder named build-before-site1.com.yml
Other relevant information
As far as I can tell this will not affect already existing Trellis instances but only extend the flexibility that the project already has. This could/should possibly be extended to all deploy hooks (if implemented) to be consistent throughout. So this is more of a request to see if it is interesting at all to the community or if I should keep using this as a custom modification for myself.
Final note
Thank you for your amazing efforts on this project. It has helped me immensely in my work and also in my personal development!
The text was updated successfully, but these errors were encountered:
This seems like a useful addition but I'm wary of adding this for every hook. There is a cost in terms of performance for all these tasks and it matters more for deploys which should be fast as possible.
Submit a feature request or bug report
Background
I have one Vagrant box to manage multiple sites (around ~25). I have refrained from using deploy hooks (mainly build_before) since I have customized build workflows between different sites and at the moment, deploy hooks are applied to all sites within one Trellis instance.
I would like to have the possibility to have customized deploy hooks per site. It would ideally look something along the lines of
build-before-site1.com.yml
and allow me to create new deploy files if necessary that are customized to each site.Example
Problem
If a site does not have a deploy hook file (e.g.
build-before-site3.com.yml
), deploying via Ansible will fail saying that the file is missing. I could probably create an empty file to bypass the error but I have another suggestion.Feature Request
What I have that is working
I have changed
roles/deploy/tasks/build.yml
and added a check to make sure that the deploy_build_before file (referenced in deploy.yml) exists and added a when statement to only run the deploy-hook if it exists.I can then do something like this in deploy.yml
And it will give me the opportunity to have a file in the deploy-hooks folder named
build-before-site1.com.yml
Other relevant information
As far as I can tell this will not affect already existing Trellis instances but only extend the flexibility that the project already has. This could/should possibly be extended to all deploy hooks (if implemented) to be consistent throughout. So this is more of a request to see if it is interesting at all to the community or if I should keep using this as a custom modification for myself.
Final note
Thank you for your amazing efforts on this project. It has helped me immensely in my work and also in my personal development!
The text was updated successfully, but these errors were encountered: