3
我想获得的所有上游的工作,就像在控制台输出:获取詹金斯上游作业
Started by upstream project "allocate" build number 31
originally caused by:
Started by upstream project "start" build number 12
originally caused by:
我已经试过常规postbuild下列要求:
def build = Thread.currentThread().executable
def causes= manager.build.getCauses()
for (cause in causes)
{
manager.listener.logger.println "upstream build: " + cause.getShortDescription()
}
但随后我只得到“分配”,而不是“开始”工作。
我也试过
def build = Thread.currentThread().executable
def test = build.getUpstreamBuilds()
for (up in test)
{
manager.listener.logger.println "test build project: " + up
}
但这是空的...
任何想法?
谢谢,你解决了! – peter
快乐,我可以帮助:) –
任何机会,你可以适应它的系统Groovy脚本?我想在运行当前版本之前从上游作业获取属性,所以不能使用Postbuild groovy,所以不能使用管理器属性(groovy.lang.MissingPropertyException:没有这样的属性:管理器类:Script1) – Ivan