aboutsummaryrefslogtreecommitdiff
path: root/vars/jfile_utils.groovy
blob: 9de646cbaaf74acdc551dd9756f55a537b32b152 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Jenkinsfile utilities

def scm_checkout() {
    skip_job = 0
    node("on-master") {
        stage("Setup") {
            checkout(scm)
            // Obtain the last commit message and examine it for skip directives.
            logoutput = sh(script:"git log -1 --pretty=%B", returnStdout: true).trim()
            if (logoutput.contains("[ci skip]") || logoutput.contains("[skip ci]")) {
                skip_job = 1
                currentBuild.result = 'SUCCESS'
                println("\nBuild skipped due to commit message directive.\n")
                return skip_job
            }
            stash includes: '**/*', name: 'source_tree'
        }
    }
    return skip_job
}

//if (skip_job == 1) {
//    currentBuild.result = 'SUCCESS'
//    println("\nBuild skipped due to commit message directive.\n")
//    return
//}


def concurrent2(mylist) {
    for (build in mylist) {
        println("concurrent2: build.nodetype = ${build.nodetype}")
    }
}