-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile_bkp
70 lines (64 loc) · 1.67 KB
/
Jenkinsfile_bkp
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
pipeline {
agent any
tools {
maven 'maven'
jdk 'java'
}
stages {
stage('Stage-0 : Static Code Analysis Using SonarQube') {
steps {
sh 'mvn clean verify sonar:sonar'
}
}
stage('Stage-1 : Clean') {
steps {
sh 'mvn clean'
}
}
stage('Stage-2 : Validate') {
steps {
sh 'mvn validate'
}
}
stage('Stage-3 : Compile') {
steps {
sh 'mvn compile'
}
}
stage('Stage-4 : Test') {
steps {
sh 'mvn test '
}
}
stage('Stage-5 : Verify') {
steps {
sh 'mvn install '
}
}
stage('Stage-6 : Package') {
steps {
sh 'mvn verify '
}
}
stage('Stage-7 : Install') {
steps {
sh 'mvn package '
}
}
stage('Stage-8 : Deploy an Artifact to AWS CodeArtifact') {
steps {
sh 'mvn deploy'
}
}
stage('Stage-9 : Deployment - Deploy a Artifact devops-2.0.0-SNAPSHOT.war file to Tomcat Server') {
steps {
sh 'curl -u admin:Earth@1a -T target/**.war "http://3.239.192.104:8080/manager/text/deploy?path=/cbapp&update=true"'
}
}
stage('Stage-10 : SmokeTest') {
steps {
sh 'curl --retry-delay 10 --retry 5 "http://3.239.192.104:8080/vindev"'
}
}
}
}