POETSII / Orchestrator

The Orchestrator is the configuration and run-time management system for POETS platforms.
1 stars 1 forks source link

Stop-on-error behaviour for batch scripts #197

Open m8pple opened 3 years ago

m8pple commented 3 years ago

I was trying to work out how to make the orchestrator run over large numbers of XML files in order to to unit/integration testing, but couldn't work out how to do it with the current behaviour. So essentially trying to do something like:

task /path = "$APP_PATH"
task /load = "$APP_NAME.xml"
task /show 
topology /set1
link /link = "$APP_NAME"
task /build = "$APP_NAME"
task /deploy = "$APP_NAME"

(I put off going through init and run for now).

At the moment it seems that if any command fails it just carries on, and there is no way of stopping as soon as one command fails. For testing purposes there is no point of carrying on, so we might as well just quit.

We could try capturing the output and grepping, but I'm not completely sure what to grep for - is there an unambiguous signal that shows whether something failed for succeeded?

I guess expected behaviour would be that if you are batch mode then any failed command causes the script to exit and to return a failure exit code.