-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfileAugBatch7.30AMIST2021
40 lines (31 loc) · 1.25 KB
/
JenkinsfileAugBatch7.30AMIST2021
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
node('wallmart-node')
{
def mavenHome = tool name: "maven3.6.2"
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), pipelineTriggers([pollSCM('* * * * *')])])
stage('CheckOutCode'){
git branch: 'development', credentialsId: 'dd65bff1-b7fd-4c5b-9bc9-6c274df50095', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git'
}
stage('Build'){
sh "${mavenHome}/bin/mvn clean package"
}
/*
stage('ExecuteSoanrQubeReport'){
sh "${mavenHome}/bin/mvn clean sonar:sonar"
}
stage('UploadArtifactIntoNexusRepo'){
sh "${mavenHome}/bin/mvn clean deploy"
}
stage('DeploytheAppintoTomcat')
{
sshagent(['b07d0aa5-2bef-49a7-9d56-940e56b6ba93']) {
sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war [email protected]:/opt/apache-tomcat-9.0.53/webapps"
}
}
stage('SendEmailNotification'){
mail bcc: '[email protected]', body: '''Build Over !!
Regards,
Mithun Technologies,
9980923226''', cc: '[email protected]', from: '', replyTo: '', subject: 'Build Over!!', to: '[email protected]'
}
*/
}//Closing brancket for Node