diff --git a/Dockerfile b/Dockerfile index 14a2807e..ab6905ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,2 @@ FROM tomcat:8.0.20-jre8 -COPY target/*.war /usr/local/tomcat/webapps/td.war +COPY target/*.war /usr/local/tomcat/webapps/cohort7.war diff --git a/README.md b/README.md index 67aca80a..bc662991 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # web-app # new commit - +# commit +# Done diff --git a/cohort9 b/cohort9 new file mode 100644 index 00000000..fcaf91c8 --- /dev/null +++ b/cohort9 @@ -0,0 +1,51 @@ + pipeline{ + agent any + tools{ + maven "maven3.8.5" + } + stages{ + stage("1.CodeClone"){ + steps{ + git credentialsId: 'Github-Cred', url: 'https://github.com/acadalearning/web-app.git' + } + } + stage("2. build"){ + steps{ + sh "echo start of maven build" + sh "mvn clean package" + } + } + stage("3. Code Quality"){ + steps{ + sh "echo start of code quality" + sh "mvn sonar:sonar" + } + } + stage("4. Backup"){ + steps{ + sh "echo backup to nexus" + sh "mvn deploy" + } + } + stage("5. Deploy to UAT"){ + steps{ + sh "echo deploy to UAT Environment" + deploy adapters: [tomcat9(credentialsId: 'tomcat-cred2', path: '', url: 'http://172.31.12.185:7000/')], contextPath: null, war: 'target/*.war' + } + } + stage("6. Approval"){ + steps{ + sh "echo approval needed" + timeout(time:2, unit:'DAYS'){ + input message:'Approval for Production eni' + } + } +} + stage("5. Deploy to Prod"){ + steps{ + sh "echo deploy to Prod Environment" + deploy adapters: [tomcat9(credentialsId: 'tomcat-cred2', path: '', url: 'http://172.31.12.185:7000/')], contextPath: null, war: 'target/*.war' + } + } +} +} diff --git a/jenkins-cohort8 b/jenkins-cohort8 new file mode 100644 index 00000000..8d77c99f --- /dev/null +++ b/jenkins-cohort8 @@ -0,0 +1,34 @@ +//scripted +node(""){ +def MHD = tool name: "maven3.8.6" +stage('GitClone'){ +sh "echo this is git clone" +git credentialsId: 'Github-Cred', url: 'https://github.com/acadalearning/web-app.git' +} +stage('Build'){ +sh "echo start of build process" +sh "${MHD}/bin/mvn package" +} +stage('CodeQuality'){ +sh "echo performing SonarQube Test" +//sh "${MHD}/bin/mvn sonar:sonar" +} +stage('BackupArtifacts'){ +sh "echo backup to Nexus" +sh "${MHD}/bin/mvn deploy" +} +stage('DeploytoStaging'){ +sh "echo Deploy to Tomcat server" +deploy adapters: [tomcat9(credentialsId: 'Tomcat-cred', path: '', url: 'http://54.196.234.205:7000/')], contextPath: null, war: 'target/*war' +} +stage('Approval'){ +sh "echo approval for Jenkins-file-app" +timeout(time:5, UNIT:'DAYS'){ +input message:'Approval for Prod' +} +} +stage('DeploytoProd'){ +sh "echo Deploy to Tomcat server" +deploy adapters: [tomcat9(credentialsId: 'Tomcat-cred', path: '', url: 'http://54.196.234.205:7000/')], contextPath: null, war: 'target/*war' +} +} diff --git a/pom.xml b/pom.xml index 3bf21532..e6240bf3 100644 --- a/pom.xml +++ b/pom.xml @@ -1,153 +1,115 @@ - - 4.0.0 - - com.mt - maven-web-application - war - 2.0.5-SNAPSHOT - - maven-web-application - - Maven Web Project for Java Project - - - ACADA Learning - http://acadalearning.com/ - - - - 1.8 - 5.1.2.RELEASE - 4.11 - 1.2.17 - http://172.31.81.112:7000/ - admin - admin - UTF-8 - UTF-8 - - - - - - - org.json - json - 20160212 - - - - - junit - junit - 3.8.1 - test - - - - javax.servlet - javax.servlet-api - 3.1.0 - provided - - - - org.mockito - mockito-core - 1.9.5 - test - - - - - - org.springframework - spring-core - ${spring.version} - - - org.springframework - spring-web - ${spring.version} - - - org.springframework - spring-webmvc - ${spring.version} - - - org.springframework - spring-context - ${spring.version} - - - - - - javax.servlet - javax.servlet-api - 3.1.0 - provided - - - - - - - nexus - ACADA Learning Releases Nexus Repository - http://172.31.86.108:8081/repository/rbc-app-release/ - - - - nexus - ACADA Learning Snapshot Nexus Repository - http://172.31.86.108:8081/repository/shared-lib-snapshot/ - - - - - - web-app - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.3 - - ${jdk.version} - ${jdk.version} - - - - - org.eclipse.jetty - jetty-maven-plugin - 9.2.11.v20150529 - - 10 - - /maven-web-application - - - - - - org.apache.maven.plugins - maven-eclipse-plugin - 2.9 - - true - true - 2.0 - maven-web-application - - - + + +4.0.0 + +com.mt +maven-web-application +2.0.7-SNAPSHOT +war + +maven-web-application + + + +17 +5.3.34 +4.13.2 + +${java.version} +${java.version} + + + + + + + +org.json +json +20240303 + + + + +jakarta.servlet +jakarta.servlet-api +5.0.0 +provided + + + + +org.springframework +spring-core +${spring.version} + + + +org.springframework +spring-context +${spring.version} + + + +org.springframework +spring-web +${spring.version} + + + +org.springframework +spring-webmvc +${spring.version} + + + + + +junit +junit +${junit.version} +test + + + +org.mockito +mockito-core +5.12.0 +test + + + + + + + +web-app + + + + +org.apache.maven.plugins +maven-compiler-plugin +3.11.0 + + + +org.eclipse.jetty +jetty-maven-plugin +11.0.20 + + +/maven-web-application +10 + + + + - - - + + + diff --git a/src/main/webapp/jsps/home.jsp b/src/main/webapp/jsps/home.jsp index d56841cd..4d97dd0f 100644 --- a/src/main/webapp/jsps/home.jsp +++ b/src/main/webapp/jsps/home.jsp @@ -11,7 +11,7 @@

Welcome to Acada Learning, Calgary, Canada Office.

We are developing and supporting quality Software Solutions to millions of clients. - We offer Training for DevOps with Linux and Cloud equipping IT Engineers for best performance. God Loves you. Everyone will be hired

+ We offer Training for DevOps with Linux and Cloud equipping IT Engineers for best performance. God Loves you. Everyone will be hired with multiple job offers, Amen

Server Side IP Address