forked from MithunTechnologiesDevOps/maven-web-application
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffff2fd
commit 05d366b
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
node{ | ||
|
||
|
||
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) | ||
|
||
def mavenHome = tool name: 'maven3.9.1' | ||
|
||
echo "The Job name is: ${JOB_NAME} " | ||
echo "The Node name is: ${NODE_NAME}" | ||
echo "The Build Number is: ${BUILD_NUMBER}" | ||
echo "Jenkins Home path is: ${JENKINS_HOME}" | ||
|
||
|
||
stage('CheckoutCode'){ | ||
git branch: 'development', credentialsId: 'aaa8e2c0-226a-40ba-85eb-259762d67c15', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' | ||
} | ||
|
||
stage('Build') | ||
{ | ||
sh "${mavenHome}/bin/mvn clean package" | ||
} | ||
|
||
/* | ||
stage('SonarQubeReport'){ | ||
sh "${mavenHome}/bin/mvn clean sonar:sonar" | ||
} | ||
stage('UploadArtifactsIntoNexus'){ | ||
sh "${mavenHome}/bin/mvn clean deploy" | ||
} | ||
stage('DeployAppIntoTomcat'){ | ||
sshagent(['dd085870-ab36-4a86-9f5b-a915e179d45d']) { | ||
sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war [email protected]:/opt/apache-tomcat-9.0.73/webapps/" | ||
} | ||
} | ||
*/ | ||
|
||
}//node closing |