what's wrong with this code? The output from it was
[Pipeline] echo
[modules/core/rwvx, modules/automation/core, modules/tools/scripts, modules/toolchain, modules/tools/CI, modules/core/util, modules/im/platform]
[Pipeline] echo
(modules/core/rwvx|modules/automation/core|modules/tools/scripts|modules/toolchain|modules/tools/CI|modules/core/util|modules/im/platform).*
[Pipeline] echo
file: "modules/im/platform"
[Pipeline] echo
interesting submodule change: modules/im/platform
[Pipeline] echo
no interesting commits found.
which implies that the "return true" was ignored
def interesting_commit_check(topmodule) {
// returns true if any interesting commits are found
modules=get_dependency_list(topmodule)
modules_re = "(" + modules.join('|') + ").*"
println("${modules_re}")
currentBuild.changeSets.each {
it.items.each {
it.affectedFiles.each {
pth = it.getPath()
println("file: \"${pth}\"")
if (it.getPath().matches('^modules.*')) {
// in a submodule ... is it an important one?
if (pth.matches(modules_re)) {
print("interesting submodule change: ${pth}")
return true
} else {
print("ignoring submodule change in ${pth}")
}
} else {
if ( pth == "RELEASE" ) {
println("ignoring release change")
} else {
print("ignoring supermod change: ${pth}")
}
}
}
}
}
print("no interesting commits found.")
return false
}
Jeremy Mordkoff
Director, Engineering Services
Headquarters:
5700 Tennyson Parkway, Plano, Texas, USA
Email:
Jeremy....@DZSi.com
Disclaimer
The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.