Skip to content

Commit

Permalink
Create Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
devopstrainingblr authored Dec 21, 2019
1 parent 5c78621 commit 94e3a7a
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,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]'
}
}

0 comments on commit 94e3a7a

Please sign in to comment.