Closed MWDelaney closed 1 year ago
Would there be a practical way to divert the deploy directory to a temporary location so that it doesn't interrupt the chain of deploys?
Overriding the project_root
variable should theoretically do that. If could be set to a dir in /tmp
?
Seems to work...
$ trellis deploy --extra-vars "dry_run=true project_root=/tmp/trellis" staging
root@example.com:/tmp/trellis# ls
releases shared
Is there an inventory that's being updated for rollback somewhere that this going to interfere with?
Is there an inventory that's being updated for rollback somewhere that this going to interfere with?
I don't think so because it's in a different path, so the normal deploy help wouldn't even know about it.
Deploys that aren't finalized get an unfinished
file written to them, but again, this would be in a different path so it's outside of the deploy cleanup process. One small risk is that they wouldn't be cleaned up by default?
Could either run the cleanup on that path, or just rm -rf
the /tmp/trellis
directory before it bails?
Deleting it right after works 👍 (maybe with a variable to optionally skip that)
This hard-codes a path that I'm setting in --extra-vars
though
Sometimes I want to be able to check if Trellis can deploy, including whether it can run its build hooks, install Composer dependencies, etc, without actually deploying. A use case example is a check using a GitHub workflow.
Test with the following:
I was able to get this working using the following GitHub workflow(s)