I am currently developing an Enterprise Manager Plug-in. I would like to script the entire process of Staging, Creating, Updating, Deploy to OMS and Deploy to Agent. My problem is scripting the last two steps.
The Deploy to OMS EMCLI command is not verbose, and closes once the process starts, so I can not run the Deploy to Agent command consecutively. The solution I came up with, which is not what I want to do, is add a 4 minute sleep in between each command. I've toyed around with the idea of running the OMS Deployment Status command, grepping the output (at some predefined interval), and continuing the script when it contains:
"Status : Success"
This is also not ideal. Is there a way to do what I need without having to be so tricky, like maybe a verbose or debug mode on the EMCLI Deploy scripts?