Skip to content

Commit 1993c9a

Browse files
authored
Create Jenkinsfile_sep22
1 parent 441a79a commit 1993c9a

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

Jenkinsfile_sep22

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
node{
2+
def mavenHome = tool name: 'maven3.8.6'
3+
stage('1cloneCode'){
4+
git "https://github.com/LandmakTechnology/maven-web-application"
5+
}
6+
stage('2Test&Build'){
7+
sh "${mavenHome}/bin/mvn clean package"
8+
//bat "${mavenHome}/bin/mvn clean package"
9+
}
10+
/*
11+
stage('3codeQuality'){
12+
sh "${mavenHome}/bin/mvn sonar:sonar"
13+
}
14+
stage('4uploadArtifacts'){
15+
//sh "${mavenHome}/bin/mvn deploy"
16+
//http://52.53.227.31:8191/landmark/repository/tesla-fe-snapshots/
17+
//http://52.53.227.31:8191/landmark/repository/tesla-fe-releases/
18+
// vi pom.xml and added repository details
19+
// vi setting.xml and add AUTHENTICATION details
20+
}
21+
stage('5deploy2UAT'){
22+
sh "echo 'deploy to UAT' "
23+
deploy adapters: [tomcat8(credentialsId: 'tomcat-credentials', path: '', url: 'http://35.170.249.131:8080/')], contextPath: null, war: 'target/*war'
24+
}
25+
stage('6approvalGate'){
26+
sh "echo 'ready for review' "
27+
timeout(time:5, unit:'DAYS') {
28+
input message: 'Application ready for deployment, Please review and approve'
29+
}
30+
}
31+
stage('7deploy2Prod'){
32+
sh "sleep 50"
33+
deploy adapters: [tomcat8(credentialsId: 'tomcat-credentials', path: '', url: 'http://35.170.249.131:8080/')], contextPath: null, war: 'target/*war'
34+
}
35+
stage('8emailNotification'){
36+
emailext body: '''Hi All,
37+
38+
Check Build status.
39+
40+
Landmark Technologies''', recipientProviders: [buildUser(), developers(), upstreamDevelopers(), brokenBuildSuspects(), brokenTestsSuspects(), contributor()], subject: 'build status', to: '[email protected]'
41+
}
42+
*/
43+
}

0 commit comments

Comments
 (0)