Hello,
I have configuration with about ten variables which contains same script ( as below ). It simply allow to choose builds from other configurations. This takes some time on start of build ( about 2 min ). I tried to add this script to only one variable for cache purpose and then use value of this "cache" in other variables, but it seems that it copy script end execute 10 times.
So, is there any way to create some variable (in my script is "output") on the fly during start of configuration and then later use this value in variables ?
${ groovy:
def output = []
def arr = []
def conf = system.getConfiguration("root/SomeConfWithSubConfigurations")
system.configurationManager.getChildren(conf).each {
arr.push(it.pathName)
}
arr.each {
logger.info(it)
system.getBuildManager().getBuilds(system.getConfiguration(it)).each {
if(it.getStatus().toString() == "SUCCESSFUL") {
output << (it.getConfiguration().getPathName() + ":" +it.getVersion())
}
}
}
util.join(output)
}