Hi Alex,

The way our tests wait for a deployment to finish is like this:

https://github.com/openshift/origin/blob/69bd3991df7256befa0c979b6620153c44b428c1/test/extended/util/framework.go#L484-L487
*https://github.com/openshift/origin/blob/69bd3991df7256befa0c979b6620153c44b428c1/test/extended/util/framework.go#L370-L482
<https://github.com/openshift/origin/blob/69bd3991df7256befa0c979b6620153c44b428c1/test/extended/util/framework.go#L370-L482>*


The key part there is using the watch API.


I think there's no CLI command that would give you as much flexibility as
the API today, but you could try to do something on top of

$ oc get dc/... --watch / --watch-only


You'd react to every new output until you see the desired state.


Rodolfo Carvalho | OpenShift

On Fri, Jul 8, 2016 at 6:02 PM, Alex Wauck <alexwa...@exosite.com> wrote:

> No luck:
> $ oc get rc -l deploymentconfig=$PROJECT,deployment=$PROJECT-12
> $ oc describe rc/$PROJECT-12
> Name: $PROJECT-12
> Namespace: $PROJECT
> Image(s):
> 172.30.151.60:5000/$PROJECT/$PROJECT@sha256:91a0d57c0dca1a985c6c5f78ccad4c1e1c79db4a98832d2f5749326da0154c88
> Selector: app=$PROJECT,deployment=$PROJECT-12,deploymentconfig=$PROJECT
> Labels: app=$PROJECT,openshift.io/deployment-config.name=$PROJECT
> Replicas: 2 current / 2 desired
> Pods Status: 1 Running / 1 Waiting / 0 Succeeded / 0 Failed
> No volumes.
> Events:
>   FirstSeen LastSeen Count From SubobjectPath Type Reason Message
>   --------- -------- ----- ---- ------------- -------- ------ -------
>   1m 1m 1 {replication-controller } Normal SuccessfulCreate Created pod:
> $PROJECT-12-7udpy
>   38s 38s 1 {replication-controller } Normal SuccessfulCreate Created
> pod: $PROJECT-12-dvjp8
>
>
> On Fri, Jul 8, 2016 at 9:57 AM, Clayton Coleman <ccole...@redhat.com>
> wrote:
>
>> oc get rc -l deploymentconfig=NAME,deployment=# should show you
>>
>> On Jul 8, 2016, at 10:07 AM, Alex Wauck <alexwa...@exosite.com> wrote:
>>
>> Is there any decent way to determine when a deployment has completed?
>> I've tried `oc get deployments`, which never shows me anything, even when I
>> have a deployment in progress.  I can go into the web UI and see a list of
>> deployments, but I can't find any way to access that information via the
>> CLI aside from parsing the very machine-unfriendly output of `oc describe
>> dc/whatever`.
>>
>> How does the web UI get that information?  It doesn't have any special
>> access that the CLI doesn't, does it?
>>
>> --
>>
>> Alex Wauck // DevOps Engineer
>>
>> *E X O S I T E*
>> *www.exosite.com <http://www.exosite.com/>*
>>
>> Making Machines More Human.
>>
>> _______________________________________________
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
>
> --
>
> Alex Wauck // DevOps Engineer
>
> *E X O S I T E*
> *www.exosite.com <http://www.exosite.com/>*
>
> Making Machines More Human.
>
>
> _______________________________________________
> 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

Reply via email to