forked from DEVOPSA12/web-app
-
Notifications
You must be signed in to change notification settings - Fork 117
/
jenkinsfilecohort7
50 lines (50 loc) · 1.15 KB
/
jenkinsfilecohort7
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
pipeline{
agent any
tools{
maven "maven3.8.4"
}
stages{
stage("1.CodeClone"){
steps{
git credentialsId: 'Github-Cred', url: 'https://github.com/team16flight/web-app.git'
}
}
stage("2.Build"){
steps{
sh "mvn clean package"
}
}
stage("3.CodeQuality"){
steps{
sh "mvn sonar:sonar"
}
}
stage("4.Artifacts"){
steps{
sh "mvn deploy"
}
}
stage("5.DeploytoUAT"){
steps{
deploy adapters: [tomcat9(credentialsId: 'tomcat-cred', path: '', url: 'http://54.226.118.23:8080/')], contextPath: null, war: 'target/*.war'
}
}
stage("6.Approval"){
steps{
timeout(time:5, unit:'DAYS'){
input message: 'Approval for Production'
}
}
}
stage("7.deploytoPROD"){
steps{
deploy adapters: [tomcat9(credentialsId: 'tomcat-cred', path: '', url: 'http://54.226.118.23:8080/')], contextPath: null, war: 'target/*.war'
}
}
stage("8.EmailNotification"){
steps{
emailext body: 'This is Build Success', subject: 'Build Success', to: '[email protected]'
}
}
}
}