0

在脚本化管道中如何获取函数的退出状态

我可以做类似的事情吗

def returnstatus=deploy_To_Ucd(name) ??? . 我想检查 UCDeployPublisher 是否成功执行

groovy 文件调用函数

deploy_To_Ucd(名称)

调用函数:

#!/bin/groovy

def 调用(字符串 envName){

step([$class: 'UCDeployPublisher', siteName: 'local', deploy: [ $class: 'com.urbancode.jenkins.plugins.ucdeploy.DeployHelper$DeployBlock', deployApp: APPLICATION_NAME ,

        deployEnv: envName,

        deployProc: DEPLOYPROCESS,

        deployVersions:  DEPLOYVERSION,

        deployOnlyChanged: DEPLOYONLYCHANGED,
        
    ]
])

}

4

0 回答 0