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

Re: Determine when a deployment finishes programmatically



a) Conditions
b) oc rollout status

On Sat, Jul 9, 2016 at 2:07 AM, Clayton Coleman <ccoleman redhat com> wrote:
Ultimately this is a gap that we'd like to fix by a) making the API expose information on the deployment config that reflects the last successful deployment and b) adding CLI commands to handle that info.

On Fri, Jul 8, 2016 at 3:58 PM, Rodolfo Carvalho <rcarvalh redhat com> wrote:
On Fri, Jul 8, 2016 at 9:19 PM, Alex Wauck <alexwauck exosite com> wrote:
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.




In that case, use and abuse the knowledge from OpenShift Origin tests.

For instance, this is a Bash helper to wait for a registry to be deployed:


You could do the same for any other deployment config.




Rodolfo Carvalho | OpenShift

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users



_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users



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