terminus icon indicating copy to clipboard operation
terminus copied to clipboard

Provide a way to push code as a synchronous operation

Open AronNovak opened this issue 5 years ago • 2 comments

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

AronNovak avatar Jul 07 '20 11:07 AronNovak

Try build:env:push from the Terminus Build Tools plugin.

greg-1-anderson avatar Jul 07 '20 17:07 greg-1-anderson

@greg-1-anderson Thanks, I'll give it a try and let you know!

AronNovak avatar Jul 07 '20 19:07 AronNovak