forked from LandmakTechnology/maven-web-application
-
Notifications
You must be signed in to change notification settings - Fork 51
/
Jenkinsfile_tesla
41 lines (39 loc) · 1.52 KB
/
Jenkinsfile_tesla
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
node{
def mavenHome = tool name: 'maven3.8.6'
stage('1cloneCode'){
git "https://github.com/LandmakTechnology/maven-web-application"
}
stage('2Test&Build'){
sh "${mavenHome}/bin/mvn clean package"
//bat "${mavenHome}/bin/mvn clean package"
}
stage('3codeQuality'){
sh "${mavenHome}/bin/mvn sonar:sonar"
}
stage('4uploadArtifacts'){
//sh "${mavenHome}/bin/mvn deploy"
//http://52.53.227.31:8191/landmark/repository/tesla-fe-snapshots/
//http://52.53.227.31:8191/landmark/repository/tesla-fe-releases/
// vi pom.xml and added repository details
// vi setting.xml and add AUTHENTICATION details
}
stage('5deploy2UAT'){
sh "echo 'deploy to UAT' "
deploy adapters: [tomcat8(credentialsId: 'tomcat-credentials', path: '', url: 'http://35.170.249.131:8080/')], contextPath: null, war: 'target/*war'
}
stage('6approvalGate'){
sh "echo 'ready for review' "
timeout(time:5, unit:'DAYS') {
input message: 'Application ready for deployment, Please review and approve'
}
}
stage('7deploy2Prod'){
sh "sleep 50"
deploy adapters: [tomcat8(credentialsId: 'tomcat-credentials', path: '', url: 'http://35.170.249.131:8080/')], contextPath: null, war: 'target/*war'
}
stage('8emailNotification'){
emailext body: '''Hi All,
Check Build status.
Landmark Technologies''', recipientProviders: [buildUser(), developers(), upstreamDevelopers(), brokenBuildSuspects(), brokenTestsSuspects(), contributor()], subject: 'build status', to: '[email protected]'
}
}