-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile2
72 lines (71 loc) · 2.24 KB
/
Jenkinsfile2
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
pipeline {
agent {
label 'guthrie'
// label 'bayard'
}
options {
timestamps()
disableConcurrentBuilds()
ansiColor('xterm')
timeout(time: 10, unit: 'MINUTES')
}
environment {
TZ='America/Denver'
E2ETESTINGDIR="${AGENT_VOLUME}"
JENKINSHOMEMOUNT='/jenkinshome'
E2ETESTMODULE='/jenkinshome/workspace/memuser/e2etesting/'
JAVA_HOME ='/usr/local/sdk/.sdkman/candidates/java/8.0.402-tem'
}
stages {
stage('build setup') {
steps {
sh 'pwd'
sh 'docker-compose --version'
}
}
stage('build/test') {
steps {
sh 'env'
sh "./java8sdk.sh 8.0.402-tem './gradlew --no-daemon clean build buildImage pushVersion pushLatest --info 2>&1'"
//asciidoctor WARNINGs go to stderr
//things like spring rest docs WARNING: Configuration property 'memuser.showHeaders' not found.
}
}
stage('docker') {
steps {
build 'panorama_integration_tests'
}
}
stage('archive') {
steps {
sh 'echo archivemeplease'
}
}
}
post {
always {
junit '**/build/**/TEST-*.xml'
script {
def buildoutput = currentBuild.rawBuild.getLog()
def foundWARNING = false
if (buildoutput != null) {
def linesWithWarning = buildoutput.findAll(/.*WARNING.*/)
String foundlines = ""
if (linesWithWarning.size() > 0) {
foundWARNING = true
linesWithWarning.each {
foundlines += it + '\n'
}
echo "found WARNING messages\n$foundlines"
}
}
if (foundWARNING) {
echo '\nWarnings found in build output. asciidoc failure? Boooooooooooo.'
currentBuild.result = 'FAILED'
} else {
echo 'No build warnings found in the output log.'
}
}
}
}
}