我想从作业的最新版本中获取构建参数,即使最新版本仍在构建中。def buildParameter = currentJob.getAction(ParametersError. class)paramValue = buildParameter.getParameter(“modificationDate”).getValue()println(paramValue)
0x6upsns1#
def build = Jenkins.get().getItems(org.jenkinsci.plugins.workflow.job.WorkflowJob).find {it.displayName == 'YOUR_JOB_NAME_HERE'}?.getLastBuild() build.actions.find{ it instanceof ParametersAction }?.parameters.each {echo "${it.name}=${it.value}"}
字符串
1条答案
按热度按时间0x6upsns1#
字符串