-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
39 lines (30 loc) · 1.04 KB
/
Jenkinsfile
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
node('jdk7') {
stage 'build'
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/apemberton/todo-web.git']]])
env.PATH="${tool 'mvn-3.2.2'}/bin:${env.PATH}"
sh 'mvn clean package'
archive 'target/*.war'
stage 'integration-test'
sh 'mvn verify'
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml', healthScaleFactor: 1.0])
}
stage 'quality-and-functional-test'
parallel(qualityTest: {
node('jdk7') {
echo 'sonar scan'
// sh 'mvn sonar:sonar'
}
}, functionalTest: {
echo 'selenium test'
// build 'sauce-labs-test'
})
try {
checkpoint('Testing Complete')
} catch (NoSuchMethodError _) {
echo 'Checkpoint feature available in Jenkins Enterprise by CloudBees.'
}
stage 'approval'
input 'Do you approve deployment to production?'
stage 'production'
echo 'mvn cargo:deploy'
// sh 'puppet apply manifest.pp'