what's wrong with this code? The output from it was

[Pipeline] 
echo<http://jenkins2.eng.riftio.com/view/My%20Builds/job/platform_build/job/master/55/console#>
[modules/core/rwvx, modules/automation/core, modules/tools/scripts, 
modules/toolchain, modules/tools/CI, modules/core/util, modules/im/platform]
[Pipeline] 
echo<http://jenkins2.eng.riftio.com/view/My%20Builds/job/platform_build/job/master/55/console#>
(modules/core/rwvx|modules/automation/core|modules/tools/scripts|modules/toolchain|modules/tools/CI|modules/core/util|modules/im/platform).*
[Pipeline] 
echo<http://jenkins2.eng.riftio.com/view/My%20Builds/job/platform_build/job/master/55/console#>
file: "modules/im/platform"
[Pipeline] 
echo<http://jenkins2.eng.riftio.com/view/My%20Builds/job/platform_build/job/master/55/console#>
interesting submodule change: modules/im/platform
[Pipeline] 
echo<http://jenkins2.eng.riftio.com/view/My%20Builds/job/platform_build/job/master/55/console#>
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
[cid:51242143-30d0-4a25-baf0-3f43dda0987e]<https://dzsi.com>
Headquarters: 5700 Tennyson Parkway, Plano, Texas, USA
Mobile: +1 978.257.2183
Email: jeremy.mordk...@dzsi.com

[cid:336fa83f-8e36-4eb8-ab7e-4ec2f11819bb]<https://dzsi.com>

[cid:e312d5dc-1a1a-4fff-b59e-2f943738876a]<https://www.linkedin.com/company/dzsi/>[cid:b3e6cf9e-3009-4ee6-8bc8-6a809306021f]<https://twitter.com/dzs_innovation>[cid:19080cb4-197b-432a-97f6-35ab31f475de]<https://www.youtube.com/channel/UCgr0fSzluyi0QYaoDgHhkBg>

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.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast, a leader in email security and cyber 
resilience. Mimecast integrates email defenses with brand protection, security 
awareness training, web security, compliance and other essential capabilities. 
Mimecast helps protect large and small organizations from malicious activity, 
human error and technology failure; and to lead the movement toward building a 
more resilient world. To find out more, visit our website.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/DM6PR12MB268230EA2370655932B7CD3783299%40DM6PR12MB2682.namprd12.prod.outlook.com.

Reply via email to