forked from MithunTechnologiesDevOps/maven-web-application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwalmartpsc
47 lines (36 loc) · 1.15 KB
/
walmartpsc
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
43
44
45
46
47
node
{
def mavenHome = tool name: "maven3.6.3"
properties([[$class: 'JiraProjectProperty'], buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '3', daysToKeepStr: '', numToKeepStr: '3')), pipelineTriggers([pollSCM('* * * * *')])])
stage('CheckoutCode')
{
git branch: 'development', credentialsId: '0fc2b8fe-0aa8-4d3d-be77-60b219ade16c', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git'
}
stage('Build')
{
sh "${mavenHome}/bin/mvn clean package"
}
/*
stage('SonarQubeReport')
{
sh "${mavenHome}/bin/mvn sonar:sonar"
}
stage('UploadArtifactIntoNexus')
{
sh "${mavenHome}/bin/mvn deploy"
}
stage('DeployappIntoTomcatServer')
{
sshagent(['cb97b0ad-6067-42a4-a9c7-4de4cce322e9']) {
sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war [email protected]:/opt/apache-tomcat-9.0.41/webapps/"
}
}
*/
stage('SendNotifications')
{
mail bcc: '[email protected]', body: '''Build Over...
Regards,
Mithun Technologies,
9980923226''', cc: '[email protected]', from: '', replyTo: '', subject: 'Build Over...', to: '[email protected]'
}
}