-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathJenkinsfile
39 lines (38 loc) · 999 Bytes
/
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('master') {
stage('Poll') {
checkout scm
echo "Poll"
}
stage('Build & Unit test') {
withMaven(maven: 'M3') {
sh 'mvn clean verify test-compile surefire:test';
}
junit '**/target/surefire-reports/TEST-*.xml'
archive 'target/*.jar'
echo "Build & Unit test"
}
stage('Static Code Analysis') {
withMaven(maven: 'M3') {
sh 'mvn clean verify sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.projectName=oven -Dsonar.projectKey=oven -Dsonar.projectVersion=$BUILD_NUMBER'
}
echo "Static Code Analysis"
}
stage('Integration Test') {
withMaven(maven: 'M3') {
sh 'mvn clean test-compile failsafe:integration-test';
}
junit '**/target/failsafe-reports/TEST-*.xml'
archive 'target/*.jar'
echo "Integration Test"
}
}
node('docker_pt') {
stage ('Start Tomcat'){
sh '''cd /home/jenkins/tomcat/bin
./startup.sh''';
}
stage ('Deploy'){
unstash 'binary'
sh 'cp target/oven'
}
}