[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Determine when a deployment finishes programmatically

On Fri, Jul 8, 2016 at 12:25 PM, Rodolfo Carvalho <rcarvalh redhat com> wrote:
@Alex, when using `oc get --watch`, probably you want to combine that with an alternative output format, like json, jsonpath or template.
Then act upon every new output.

That will probably be OK.  I see that using a different output format tells me how many replicas I should expect, so I can just wait for status.replicas to match spec.replicas.
Or maybe I just interpreted you wrong and all you want is some programmatic way the current deployment state? (complete, failed, running)
And not *wait for it to finish*?

Well, if I can get the current deployment state, I can wait for it to finish by polling until the state is "Complete".  This is intended for use in automated tests, since we don't really want to start testing until the new version is fully deployed in our staging environment.
Alex Wauck // DevOps Engineer

E X O S I T E 

Making Machines More Human.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]