-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathJenkinsFile_20200809
More file actions
44 lines (43 loc) · 1.26 KB
/
Copy pathJenkinsFile_20200809
File metadata and controls
44 lines (43 loc) · 1.26 KB
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
pipeline {
agent any
stages {
stage('Compile the Source Code') {
steps {
withMaven(maven : 'maven'){
sh 'mvn clean compile'
}
}
}
stage('Test the Source Code') {
steps {
withMaven(maven : 'maven'){
sh 'mvn clean test'
}
}
}
stage('Package the Source Code'){
steps {
withMaven(maven : 'maven'){
sh 'mvn clean package'
}
}
}
stage('Push Artifacts to Artifacts i.e. Nexus/Jfrog') {
steps {
withMaven(maven : 'maven'){
sh 'mvn deploy'
}
}
}
stage('Deploy the Code to Tomcat Application Server') {
steps {
sh 'curl -u admin:redhat@123 -T target/**.war "http://18.217.227.118:8080/manager/text/deploy?path=/devsecai&update=true"'
}
}
stage('Smoke Test - After Code Deploy To Application Server') {
steps {
sh "curl --retry-delay 10 --retry 5 http://18.217.227.118:8080/devsecai/"
}
}
}
}