diff --git a/JenkinsDeclarativePipelineScript b/JenkinsDeclarativePipelineScript index fdae01e..de94570 100644 --- a/JenkinsDeclarativePipelineScript +++ b/JenkinsDeclarativePipelineScript @@ -2,7 +2,7 @@ pipeline{ agent any tools { - maven "maven3.8.4" + maven "maven3.8.5" } triggers { pollSCM '* * * * * ' diff --git a/JenkinsDeclarativePipelineScriptMarch2022 b/JenkinsDeclarativePipelineScriptMarch2022 index aaa61c5..114164c 100644 --- a/JenkinsDeclarativePipelineScriptMarch2022 +++ b/JenkinsDeclarativePipelineScriptMarch2022 @@ -1,7 +1,7 @@ pipeline{ agent any tools{ - maven "maven3.8.4" + maven "maven3.8.5" } stages{ stage('1.clone'){ diff --git a/Jenkinsfile b/Jenkinsfile index 0830d89..9149070 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ node{ - def MHD = tool name: "maven3.8.4" + def MHD = tool name: "maven3.8.5" stage('code'){ git branch: 'development', url: 'https://github.com/LandmakTechnology/web-app' } diff --git a/Jenkinsfile-scripted b/Jenkinsfile-scripted index 820c418..10ddae5 100644 --- a/Jenkinsfile-scripted +++ b/Jenkinsfile-scripted @@ -1,6 +1,6 @@ //scripted pipeline node{ - def MHD = tool name: "maven3.8.4" + def MHD = tool name: "maven3.8.5" stage('1.Initiation'){ sh "echo Start of td deployment" } diff --git a/Jenkinsfile27 b/Jenkinsfile27 index c0d2106..2e4d048 100644 --- a/Jenkinsfile27 +++ b/Jenkinsfile27 @@ -1,5 +1,5 @@ node{ - def mavenHome = tool name: 'maven3.8.4' + def mavenHome = tool name: 'maven3.8.5' stage('1.Clone'){ git branch: 'master', credentialsId: 'Git_Credentials', url: 'https://github.com/LandmakTechnology/paypal-web-app' } diff --git a/Jenkinsfile_boa b/Jenkinsfile_boa index 494bb53..7110aa4 100644 --- a/Jenkinsfile_boa +++ b/Jenkinsfile_boa @@ -1,5 +1,5 @@ node{ - def mavenHome = tool name: 'maven3.8.4' + def mavenHome = tool name: 'maven3.8.5' stage('1.Clone'){ git branch: 'master', credentialsId: 'Git_Credentials', url: 'https://github.com/LandmakTechnology/paypal-web-app' } diff --git a/jenkins27 b/jenkins27 new file mode 100644 index 0000000..2e4d048 --- /dev/null +++ b/jenkins27 @@ -0,0 +1,47 @@ +node{ + def mavenHome = tool name: 'maven3.8.5' + stage('1.Clone'){ + git branch: 'master', credentialsId: 'Git_Credentials', url: 'https://github.com/LandmakTechnology/paypal-web-app' + } + stage('2.MavenBuild'){ + sh "${mavenHome}/bin/mvn clean package" + // bat 'mvn package' + } + /* stage('3.CodeQuality'){ + sh "${mavenHome}/bin/mvn sonar:sonar" + } + stage('4.UploadArtifacts'){ + sh "${mavenHome}/bin/mvn deploy" + } + stage('6.Deploy2dev'){ + deploy adapters: [tomcat9(credentialsId: 'Tomcat_Credentials', path: '', url: 'http://18.207.210.70:8080/')], contextPath: null, war: 'target/web-app.war' +} + stage('5.Deploy2uat'){ + sshagent(['agentcredentials']) { + // sh "scp -o StrictHostKeyChecking=no target/*.war ec2-user@172.31.89.218:/opt/tomcat9/webapps/uat.war" + +} + + } + stage('7.approval'){ + timeout(time:8, unit:'HOURS'){ + input message: 'Please approve deployment to Production' + } + } + stage('8.Deploy2prod'){ + sshagent(['agentcredentials']) { + sh "scp -o StrictHostKeyChecking=no target/*.war ec2-user@172.31.89.218:/opt/tomcat9/webapps/app.war" + +} + + } + stage('9.EmailAlerts'){ + emailext body: '''Hi + +Build status for boa app. + +Regards, +Landmark Technologies''', recipientProviders: [developers(), requestor()], subject: 'Project status', to: 'boa@gmail.com' + } + */ +}