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

问题描述 投票:0回答:1

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

我正在尝试检索路由主机名以将其放入变量中。

这是我为实现该目标而做的,但是不起作用:

openshift.selector("route", "${params.APPLICATION_NAME}") {
                    def dc = it.object()
                    shortname = dc.spec.host
                    echo "This is the route : $shortname"}
jenkins jenkins-pipeline openshift jenkins-job-dsl openshift-enterprise
1个回答
0
投票

我在下面找到了使用此命令的方法:

def route1 = openshift.selector("route", "${params.APPLICATION_NAME}").narrow('route').object()

echo "This the route of the application ${route1.spec.host}"
© www.soinside.com 2019 - 2024. All rights reserved.