Skip to content

Commit

Permalink
Create Jenkinsfile34
Browse files Browse the repository at this point in the history
  • Loading branch information
legah2045 authored Dec 17, 2023
1 parent c1b576e commit 4783507
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions Jenkinsfile34
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
node{
def mavenHome = tool name: 'maven3.9.6'
stage('1.clonecode'){
git "https://github.com/LandmakTechnology/maven-web-application"
}
stage('2.mavenBuild'){
sh "${mavenHome}/bin/mvn package"
}
/*
stage('3.codeQualityAnalysis'){
sh "${mavenHome}/bin/mvn sonar:sonar"
}

stage('4.uploadArtifacts'){
sh "${mavenHome}/bin/mvn deploy"
}
stage('5.deploy2UAT'){
deploy adapters: [tomcat9(credentialsId: 'tomcat-credentials', path: '', url: 'http://3.144.85.2:8088/')], contextPath: null, war: 'target/*war'

}
stage('6.ManualApproval'){
sh " echo 'Please review & approve' "
timeout(time:300, unit:'MINUTES')
{
input message: 'Application ready for deployment, Please review and approve'
}
}
stage('7.deploy2prod'){
//use deploy to container plugin
deploy adapters: [tomcat9(credentialsId: 'tomcat-credentials', path: '', url: 'http://3.144.85.2:8088/')], contextPath: null, war: 'target/*war'

}
stage('8.apm'){
sh "echo 'monitoring and observation and alerting' "
sh "echo 'application performance Monitoring in progress' "
}
stage('9.notification'){
sh "echo create email notification to resolve any issue that may arise"
//use pipeline syntax and email notification plugin to achieve this
emailext body: '''The build and Deployment status for tesla-webapp.

Regards,
Landmark Technologies''', recipientProviders: [developers(), upstreamDevelopers(), buildUser()], subject: 'job status', to: '[email protected]'

}
*/
}

0 comments on commit 4783507

Please sign in to comment.