Skip to content

Commit c1464bd

Browse files
new jenkinsfile for cohort7
1 parent 95200fd commit c1464bd

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

jenkinsfilecohort7

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
pipeline{
2+
agent any
3+
tools{
4+
maven "maven3.8.4"
5+
}
6+
stages{
7+
stage("1.CodeClone"){
8+
steps{
9+
git credentialsId: 'Github-Cred', url: 'https://github.com/team16flight/web-app.git'
10+
}
11+
}
12+
stage("2.Build"){
13+
steps{
14+
sh "mvn clean package"
15+
}
16+
}
17+
stage("3.CodeQuality"){
18+
steps{
19+
sh "mvn sonar:sonar"
20+
}
21+
}
22+
stage("4.Artifacts"){
23+
steps{
24+
sh "mvn deploy"
25+
}
26+
}
27+
stage("5.DeploytoUAT"){
28+
steps{
29+
deploy adapters: [tomcat9(credentialsId: 'tomcat-cred', path: '', url: 'http://54.226.118.23:8080/')], contextPath: null, war: 'target/*.war'
30+
}
31+
}
32+
stage("6.Approval"){
33+
steps{
34+
timeout(time:5, unit:'DAYS'){
35+
input message: 'Approval for Production'
36+
}
37+
}
38+
}
39+
stage("7.deploytoPROD"){
40+
steps{
41+
deploy adapters: [tomcat9(credentialsId: 'tomcat-cred', path: '', url: 'http://54.226.118.23:8080/')], contextPath: null, war: 'target/*.war'
42+
}
43+
}
44+
stage("8.EmailNotification"){
45+
steps{
46+
emailext body: 'This is Build Success', subject: 'Build Success', to: '[email protected]'
47+
}
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)