1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
steps {
script {
def util = load("${env.WORKSPACE}/scripts/build_util.groovy")
util.runStep1()
}
}
steps {
script {
def util = load("${env.WORKSPACE}/scripts/build_util.groovy")
util.runStep2()
}
}
steps {
script {
def util = load("${env.WORKSPACE}/scripts/build_util.groovy")
util.runStep3()
}
}
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
stage('Environment') {
agent { node { label 'master' } }
steps {
script {
def util = load("${env.WORKSPACE}/scripts/build_util.groovy")
}
}
}
post {
// Things that we want done regardless of pipeline's outcome
//
always {

// Push the overall statistics from all the stages to InfluxDB
//
node (LINUX_BUILD_NODE){
script{
//Mail sending function call
//
util.runStep1()
util.runStep2()
util.runStep3()
}
}
}
}
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
34
35
def util;

pipeline {
agent any
stages {
stage('one') {
steps {
script {
util = load("${env.WORKSPACE}/scripts/build_util.groovy")
util.runStep1()
}
}
}
post {
util.xxxx
}

stage('two') {
steps {
script {
util = load("${env.WORKSPACE}/scripts/build_util.groovy")
util.runStep2()
}
}
}
post {
util.xxxx
}

}

post {
util.xxxx
}
}