-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
36 lines (34 loc) · 1.13 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
node {
def mvnHome
stage('Prepare') {
git branch: 'master', credentialsId: '63c477d0-d5c1-4213-80db-c08e4f242df1', url: 'https://github.com/US1E007/MyApp2'
mvnHome = tool 'maven'
}
stage('Build') {
if (isUnix()) {
sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package"
} else {
bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean package/)
}
}
stage('Integration Test') {
if (isUnix()) {
sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean verify"
} else {
bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean verify/)
}
}
stage('Sonar') {
if (isUnix()) {
sh "'${mvnHome}/bin/mvn' sonar:sonar"
} else {
bat(/"${mvnHome}\bin\mvn" sonar:sonar/)
}
}
stage('Deploy') {
deploy adapters: [tomcat9(credentialsId: 'TomcatManagerScript', path: '', url: 'http://localhost:7070')], contextPath: 'players', war: '**/*.war'
}
stage("Smoke Test"){
bat "curl --retry-delay 10 --retry 5 http://localhost:7070/players"
}
}