Skip to content

Commit c35faa5

Browse files
authored
Create Jenkins_tesla
1 parent 682fa30 commit c35faa5

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Jenkins_tesla

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

0 commit comments

Comments
 (0)