terminus
terminus copied to clipboard
Provide a way to push code as a synchronous operation
Expected behavior
git push
terminus remote:drush site.dev cim
Should always import the latest configuration changes that are pushed.
Actual behavior
There's a race condition, as git push kicks the workflow, but there's no guarantee that drush cim is executed after the code is deployed to the given environment.
Possible way to fix
Sync git push
It might be possible to make git push wait for the completion of the workflow operation. Likely there are too much drawbacks.
Command to wait until code is deployed to env
There could be a new command that waits until the completion, similarly to env:wake
git push
terminus env:deploy-success site.dev
terminus remote:drush site.dev cim
I crafted one-liner in Bash that could be turned into a command:
terminus workflow:list site --format=csv | grep dev | grep Sync | grep -v succeeded
Try build:env:push from the Terminus Build Tools plugin.
@greg-1-anderson Thanks, I'll give it a try and let you know!