forked from MithunTechnologiesDevOps/maven-web-application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
42 lines (35 loc) · 879 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
39
40
41
42
node
{
def mavenHome=tool name: "maven3.6.3"
stage('Checkout')
{
git branch: 'development', credentialsId: 'bed5a851-d84d-412e-87e7-bf9ce23c0e0e', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git'
}
/*
stage('Build')
{
sh "${mavenHome}/bin/mvn clean package"
}
stage('ExecuteSoanrQubeReport')
{
sh "${mavenHome}/bin/mvn sonar:sonar"
}
stage('UploadArtifactintoNexus')
{
sh "${mavenHome}/bin/mvn deploy"
}
stage('DeployAppintoTomcat')
{
sshagent(['cd93d61f-2d0f-4c60-8b33-34cf4fa888b0']) {
sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war [email protected]:/opt/apache-tomcat-9.0.29/webapps/"
}
}
*/
stage('SendEmailNotification')
{
emailext body: '''Build is over..
Regards,
Mithun Technologies,
9980923226.''', subject: 'Build is over', to: '[email protected]'
}
}