forked from MithunTechnologiesDevOps/maven-web-application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JenkinsfileFeb7.30Batch
35 lines (26 loc) · 1.02 KB
/
JenkinsfileFeb7.30Batch
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
node{
echo "The Job name is: ${JOB_NAME}"
echo "The buils number is: ${BUILD_NUMBER}"
echo "The node name is : ${NODE_NAME}"
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])])
def mavenHome = tool name: 'maven3.8.8'
stage('CheckoutCode'){
git branch: 'development', credentialsId: '4768a632-7cb1-4a54-96e5-816d16a40c7f', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git'
}
stage('Build'){
sh "${mavenHome}/bin/mvn clean package"
}
/*
stage('ExecuteSonarQubeReport'){
sh "${mavenHome}/bin/mvn clean sonar:sonar"
}
stage('UploadArtifactsIntoNexus'){
sh "${mavenHome}/bin/mvn clean deploy"
}
stage('DeployAppintoTomcat'){
sshagent(['a2296f55-cf3b-4b3f-a5b5-17b11d8b83f2']) {
sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war [email protected]:/opt/apache-tomcat-9.0.73/webapps/"
}
}
*/
}