我想获得所有上游作业,就像在控制台输出中一样:
Started by upstream project "allocate" build number 31
originally caused by:
Started by upstream project "start" build number 12
originally caused by:
我已经尝试了以下的 groovy 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
}
但这是空的......
有任何想法吗?