Tasks run in the wrong order #2277
Replies: 11 comments 1 reply
|
Ple, attached full deploy.php and clarity what exactly order is now, and what you want to be. |
|
https://gist.github.com/danielfaulknor/a3b7bbe4e81adb0c10ad1647672eaeec with I want it to run each task in do_deploy over every host that is applicable before it moves onto the next task, so |
|
Still didn’t get it, please create minimal representation example. Or try to update to v7. It was redesigned and maybe solved your problem already 🤔 |
|
Thanks for your response! Here is a minimal example. As you can see in the task I call "first" then "second" but they run the other way around: |
|
I seem to be unable to build the v7 beta: |
|
You can download phar from website too. |
|
Also try using group task instead of invoke. |
|
I tried v7 and couldn't work out how to get it to work. I got stuck on setting roles on a host For group task, it does nothing at all: I tried using |
|
Try this: task('deploy', [
'first',
'second',
]); |
|
Now it is ignoring I tried v7 but the UPGRADING doc is incomplete |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
All tasks are executed for a host before moving on to the next host, based on the order the hosts are defined, rather than doing the tasks in order. This means that pre-tasks on one host (for example generate a file and download) are happening before the host the files are needed for (upload)
To reproduce
If the hosts with web roles are after the hosts with the lb roles, the lb task runs first. This is just one example, there are many times this causes an issue during our deploy.
Expected behavior
Follow the order of tasks, going back and forth between hosts as required.
Environment
All reactions