-
Notifications
You must be signed in to change notification settings - Fork 594
/
Jenkinsfile
37 lines (32 loc) · 1.04 KB
/
Jenkinsfile
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
//Jenkins pipeline script
//Groovy script
node{
def mavenHome = tool name: 'maven3.8.1'
stage('CodeClone') {
git credentialsId: 'git-credentials', url: 'https://github.com/mylandmarktechs/web'
}
stage('mavenBuild') {
sh "${mavenHome}/bin/mvn clean package"
}
/*
stage('CodeQuality') {
sh "${mavenHome}/bin/mvn sonar:sonar"
// execute the CodeQuality report with sonar
}
stage('emailQualityIssues') {
emailext body: '''Thanks
Landmark Technologies''', recipientProviders: [developers()], subject: 'status of build', to: '[email protected]'
}
stage('UploadNexus') {
sh "${mavenHome}/bin/mvn deploy"
//mvn deploy are uploaded in to nexus
}
stage('DeployTomcat') {
deploy adapters: [tomcat9(credentialsId: 'tomcat', path: '', url: 'http://34.239.155.145:7000/')], contextPath: null, war: 'target/*war'
}
stage('emailDeployIssues') {
emailext body: '''Thanks
Landmark Technologies''', recipientProviders: [developers()], subject: 'status of build', to: '[email protected]'
}
*/
}