[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:


(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:

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

echo "Checking for successful test deployment at $HOSTNAME"
set +e
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   <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?


users mailing list
users lists openshift redhat com

Ben Parees | OpenShift

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