forked from myLandmarckeTechnologies/maven-web-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
38 lines (32 loc) · 913 Bytes
/
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
38
node
{
def mavenHome = tool name: "maven3.6.3"
stage("1. git clone")
{
git credentialsId: 'GitCredentials', url: 'https://github.com/myLandmakTechnology/maven-web-app'
}
stage("2. Build")
{
sh "${mavenHome}/bin/mvn clean package"
// bat mvn clean package - for winows OS
}
stage('3. SonarQubeReport')
{
sh "${mavenHome}/bin/mvn sonar:sonar"
}
stage('4. Nexus')
{
sh "${mavenHome}/bin/mvn deploy"
}
stage('5. Deploy')
{
deploy adapters: [tomcat9(credentialsId: 'Tomcat-Credentials', path: '', url: 'http://54.163.156.108:8888/')], contextPath: null, war: 'target/*war'
}
stage('6. Email Notification')
{
emailext body: '''Hi
Build Status
Landmark Technology
+ 1 437 215 2483''', recipientProviders: [developers()], subject: 'Build status', to: '[email protected]'
}
}