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

RE: OpenShiftV3 CLI: oc get - command



Very nice, but where can I find where the env variables &apos and &quot stand for?


From: bparees redhat com
Date: Fri, 30 Oct 2015 08:39:16 -0400
Subject: Re: OpenShiftV3 CLI: oc get - command
To: lorenz vanthillo outlook com
CC: users lists openshift redhat com

the sample jenkins job in our openshift jenkins image already has code to do exactly that:

https://github.com/openshift/jenkins/blob/master/1/contrib/openshift/configuration/jobs/OpenShift%20Sample/config.xml#L81

(note that you'll have to de-escape the xml syntax).

If you aren't using our image already, you might want to take a look at this tutorial:
https://github.com/openshift/origin/blob/master/examples/jenkins/README.md

Note that the current "very complicated shell script job" is a point in time example, we are actively working on a first class jenkins plugin that will define concrete build steps you can add to a jenkins job which will directly communicate with openshift.


On Fri, Oct 30, 2015 at 8:21 AM, Lorenz Vanthillo <lorenz vanthillo outlook com> wrote:
I've Jenkins running in a pod, and I want to build + deploy an application (also on OpenShift, with jenkins).
It's working fine. Except the last part. There I want to check if it's possible to curl to my cluster_ip(ofservice):port to see if the app is available:

$SERVICE_IP=oc get service
$PORT

echo "Checking for successful test deployment at $HOSTNAME"
set +e
rc=1
count=0
attempts=100
while [ $rc -ne 0 -a $count -lt $attempts ]; do
  if curl -s --connect-timeout 2 $SERVICE_IP:$PORT >& /dev/null; then


As you can see, the code is not finished. I'm working with environment variables and I need to get the cluster ip and the port of my service:
oc get service test
NAME      CLUSTER_IP      EXTERNAL_IP   PORT(S)    SELECTOR                         AGE
test      172.30.211.29   <none>        8080/TCP   app=test,deploymentconfig=test   20h

I can get my service, but is it possible to filter the CLUSTER_IP or PORT with an oc-command?

Thanks

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




--
Ben Parees | OpenShift


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