有人知道如何通过 jenkins 管道检索在 openshift 上运行的应用程序的路由主机名吗?



正如标题所说,有人知道如何通过 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}"

相关内容

最新更新