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/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..af8b156 100644 --- a/Jenkinsfile_boa +++ b/Jenkinsfile_boa @@ -1,46 +1,40 @@ node{ - def mavenHome = tool name: 'maven3.8.4' - stage('1.Clone'){ - git branch: 'master', credentialsId: 'Git_Credentials', url: 'https://github.com/LandmakTechnology/paypal-web-app' + def mavenHome = tool name:'maven3.8.5' + stage('1Clone'){ + git branch: 'master', credentialsId: 'GitHub-Credentials', url: 'https://github.com/poliscasfino/Paypal-web-app' } - stage('2.MavenBuild'){ + stage('2MavenBuild'){ sh "${mavenHome}/bin/mvn clean package" - // bat 'mvn package' } - stage('3.CodeQuality'){ + stage('3CodeQuality'){ sh "${mavenHome}/bin/mvn sonar:sonar" - } - stage('4.UploadArtifacts'){ + } + 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'){ + } + stage('5.Deploy2dev'){ + deploy adapters: [tomcat9(credentialsId: 'tomcat-credentials', path: '', url: 'http://52.87.97.53:8080/')], contextPath: null, war: 'target/*war' + } + stage('6.Deploy2uat'){ + sshagent(['TomcatKey']) { + // some block + sh "scp -o StrictHostKeyChecking=no target/*.war ec2-user@52.87.97.53:/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('8.Deploy2pro'){ + sshagent(['TomcatKey']) { + sh "scp -o StrictHostKeyChecking=no target/*.war ec2-user@52.87.97.53:/opt/tomcat9/webapps/uat.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' } -} + stage('9.EmailAlerts'){ + emailext body: '''Hello Idara, + Build status for boa app. + Regards + Taiwo''', recipientProviders: [developers(), requestor()], subject: 'Project Status', to: 'taiwoabbey147@yahoo.com' + } + } +} diff --git a/jenkins277 b/jenkins277 new file mode 100644 index 0000000..c0f29b7 --- /dev/null +++ b/jenkins277 @@ -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' + } + */ +} diff --git a/jenkinsfile_boa b/jenkinsfile_boa new file mode 100644 index 0000000..af8b156 --- /dev/null +++ b/jenkinsfile_boa @@ -0,0 +1,40 @@ +node{ + def mavenHome = tool name:'maven3.8.5' + stage('1Clone'){ + git branch: 'master', credentialsId: 'GitHub-Credentials', url: 'https://github.com/poliscasfino/Paypal-web-app' + } + stage('2MavenBuild'){ + sh "${mavenHome}/bin/mvn clean package" + } + stage('3CodeQuality'){ + sh "${mavenHome}/bin/mvn sonar:sonar" + } + stage('4.UploadArtifacts'){ + sh "${mavenHome}/bin/mvn deploy" + } + stage('5.Deploy2dev'){ + deploy adapters: [tomcat9(credentialsId: 'tomcat-credentials', path: '', url: 'http://52.87.97.53:8080/')], contextPath: null, war: 'target/*war' + } + stage('6.Deploy2uat'){ + sshagent(['TomcatKey']) { + // some block + sh "scp -o StrictHostKeyChecking=no target/*.war ec2-user@52.87.97.53:/opt/tomcat9/webapps/uat.war" +} +stage('7.approval'){ + timeout(time:8, unit:'HOURS'){ + input message: 'Please approve deployment to Production' + } + } + stage('8.Deploy2pro'){ + sshagent(['TomcatKey']) { + sh "scp -o StrictHostKeyChecking=no target/*.war ec2-user@52.87.97.53:/opt/tomcat9/webapps/uat.war" +} + } + stage('9.EmailAlerts'){ + emailext body: '''Hello Idara, + Build status for boa app. + Regards + Taiwo''', recipientProviders: [developers(), requestor()], subject: 'Project Status', to: 'taiwoabbey147@yahoo.com' + } + } +} diff --git a/pom.xml b/pom.xml index 65e06ef..d2b1346 100644 --- a/pom.xml +++ b/pom.xml @@ -21,8 +21,8 @@ 5.1.2.RELEASE 4.11 1.2.17 - http:3.83.86.27:9000/ - class28 + http:3.84.12.211:9000/ + admind admin UTF-8 UTF-8 @@ -92,17 +92,18 @@ + nexus Landmark Technologies Releases Nexus Repository - http://3.86.113.205:8888/repository/paypal-releases/ + http://44.201.104.125:8081/repository/paypal-releases/ nexus Landmark Technologies Snapshot Nexus Repository - http://3.86.113.205:8888/repository/paypal-snapshots/ + http://44.201.104.125:8081/repository/paypal-snapshots/