Skip to content

Instantly share code, notes, and snippets.

@cesarvr
Created May 12, 2020 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cesarvr/57dd204cdeb4f117cdbf25099ebd7346 to your computer and use it in GitHub Desktop.
Save cesarvr/57dd204cdeb4f117cdbf25099ebd7346 to your computer and use it in GitHub Desktop.
def getRunningPod(label) {
def runningPod = sh (
script: "oc get pod --selector=application=${label} -o=jsonpath={.items[0].metadata.name}",
returnStdout: true ).trim()
return runningPod
}
def getRoute(label) {
def route = sh (
script: " oc get route --selector=application=${label} -o jsonpath={.spec.host}",
returnStdout: true ).trim()
return route
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment