diff --git a/Jenkinsfile b/Jenkinsfile index 82d63ae784..79b1a0d71a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,54 +1,34 @@ -node - { - - def mavenHome = tool name: "maven3.6.2" - - echo "GitHub BranhName ${env.BRANCH_NAME}" - echo "Jenkins Job Number ${env.BUILD_NUMBER}" - echo "Jenkins Node Name ${env.NODE_NAME}" - - echo "Jenkins Home ${env.JENKINS_HOME}" - echo "Jenkins URL ${env.JENKINS_URL}" - echo "JOB Name ${env.JOB_NAME}" - - properties([[$class: 'JiraProjectProperty'], buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '2', daysToKeepStr: '', numToKeepStr: '2')), pipelineTriggers([pollSCM('* * * * *')])]) - - stage("CheckOutCodeGit") - { - git branch: 'development', credentialsId: '65fb834f-a83b-4fe7-8e11-686245c47a65', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' - } - - stage("Build") - { - sh "${mavenHome}/bin/mvn clean package" - } - - /* - stage("ExecuteSonarQubeReport") - { +node{ +def mavenHome = tool name: 'maven3.9.2' +stage('1.clone'){ + //git "https://github.com/solomanty/maven-web-application" + git branch: 'development', url: 'https://github.com/solomanty/maven-web-application' +} +stage('2.test and build'){ + sh "${mavenHome}/bin/mvn package" +} +stage('3.CodeQualityAnalysis'){ sh "${mavenHome}/bin/mvn sonar:sonar" - } - - stage("UploadArtifactsintoNexus") - { - sh "${mavenHome}/bin/mvn deploy" - } - - stage("DeployAppTomcat") - { - sshagent(['423b5b58-c0a3-42aa-af6e-f0affe1bad0c']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@15.206.91.239:/opt/apache-tomcat-9.0.34/webapps/" - } - } - - stage('EmailNotification') - { - mail bcc: 'devopstrainingblr@gmail.com', body: '''Build is over +} +stage('4.Artifactory'){ + sh "${mavenHome}/bin/mvn deploy"} +stage('5.deploy2UAT'){ +deploy adapters: [tomcat9(credentialsId: 'tomcat-credential', path: '', url: 'http://3.94.146.235:8177/')], contextPath: null, war: 'target/*war' +} +stage('6.approval'){ + sh "echo 'apps ready for review' " + timeout(time:5, unit: 'HOURS') { + input message: 'Application ready for deployment, please review and approve' + } +} +stage('7.production'){ + deploy adapters: [tomcat9(credentialsId: 'tomcat-credential', path: '', url: 'http://3.94.146.235:8177/')], contextPath: null, war: 'target/*war' +} +stage('8.notification'){ + emailext body: '''Hello Team, +Please check the pipeline work done. - Thanks, - Mithun Technologies, - 9980923226.''', cc: 'devopstrainingblr@gmail.com', from: '', replyTo: '', subject: 'Build is over!!', to: 'devopstrainingblr@gmail.com' - } - */ - - } +Solomon Alamutu''', recipientProviders: [buildUser()], subject: 'Build status', to: 'developers' +} +} + diff --git a/pom.xml b/pom.xml index 240a0c2841..7e8d727ec4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.mt maven-web-application war - 0.0.1-SNAPSHOT + 0.0.3-SNAPSHOT maven-web-application @@ -21,7 +21,7 @@ 5.1.2.RELEASE 4.11 1.2.17 - http:3.96.196.171:9000/ + http:54.152.58.6:9000/ admin admin UTF-8 @@ -98,19 +98,20 @@ nexus Landmark Technologies Releases Nexus Repository - http://35.174.19.3:8081/repository/amazon-release/ + http://44.201.230.105:8081/repository/tesla-releases/ - + + nexus - Landmark Technologies Snapshot Nexus Repository - http://35.174.19.3:8081/repository/amazon-snapshot/ + Landmark Technologies Snapshot Nexus Repository + http://44.201.230.105:8081/repository/tesla-snapshots/ - Landmark + Tesla-webapp diff --git a/src/main/webapp/jsps/home.jsp b/src/main/webapp/jsps/home.jsp index d3c9470330..d5ed961f83 100644 --- a/src/main/webapp/jsps/home.jsp +++ b/src/main/webapp/jsps/home.jsp @@ -10,7 +10,7 @@

Landmark Technology --> A Metropolitan University Company

-

Welcome to Landmark Technology.......We have a demo on DevOps E Degree with Linux and AWS on Saturday August 5, 2020 at 4pm EST for our new batch. +

Welcome to Landmark Technology.......We have a demo on DevOps E Degree with Linux and AWS on Saturday July 15, 2023 at 4pm EST for our new batch. Landmark Technology is a an ideal online training platform for DevOps and Cloud Infrastructures. Our anointed and extensive teaching approach takes our students with or without any IT Background to become Subject Matter Expect in IT, and DevOps automation. Over 80% of our students are hired within 6 months of joining Landmark Technology.