正如标题所述,有人知道如何通过jenkins管道检索在openshift上运行的应用程序的路由主机名吗?
我正在尝试检索路由主机名以将其放入变量中。
这是我为实现该目标而做的,但是不起作用:
openshift.selector("route", "${params.APPLICATION_NAME}") {
def dc = it.object()
shortname = dc.spec.host
echo "This is the route : $shortname"}
我在下面找到了使用此命令的方法:
def route1 = openshift.selector("route", "${params.APPLICATION_NAME}").narrow('route').object()
echo "This the route of the application ${route1.spec.host}"