diff --git a/Dockerfile b/Dockerfile index ab6905ac..af49063e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,2 @@ FROM tomcat:8.0.20-jre8 -COPY target/*.war /usr/local/tomcat/webapps/cohort7.war +COPY target/web-app.war usr/local/tomcat/webapps diff --git a/JenkinsDeclarativePipelineScript b/JenkinsDeclarativePipelineScript deleted file mode 100644 index fdae01e9..00000000 --- a/JenkinsDeclarativePipelineScript +++ /dev/null @@ -1,59 +0,0 @@ -//declarative pipeline -pipeline{ - agent any - tools { - maven "maven3.8.4" - } - triggers { - pollSCM '* * * * * ' -} - stages { - stage('1.CodeClone'){ - steps{ - git branch: 'stage', credentialsId: 'GitHubCredentials', url: 'https://github.com/LandmakTechnology/web-app' - } - } - stage('2.mavenBuild'){ - steps{ - sh "mvn clean package" - } - } - stage('3.CodeQuality') { - steps{ - sh "echo reports done" - //sh "mvn sonar:sonar" - } - } - stage('4.uploadToNexus'){ - steps{ - sh "echo artifacts uploaded" - //sh "mvn deploy" - } - } - stage('5.Deploy2Tomcat'){ - steps{ - sshagent(['32d5fb4f-d92f-4a10-9f12-2738eab55fcc']) { - sh "scp -o StrictHostKeyChecking=no target/*war ec2-user@172.31.15.31:/opt/tomcat9/webapps/app" -} - -} - } - } - post{ - always { - mail bcc: 'td-app@gmail.com', body: '''Build complete - -Landmark Technologies''', cc: 'td-app@gmail.com', from: '', replyTo: '', subject: 'Build done', to: 'td-app@gmail.com' - } - failure { - mail bcc: 'td-app@gmail.com', body: '''Build complete - -Landmark Technologies''', cc: 'td-app@gmail.com', from: '', replyTo: '', subject: 'Build failed', to: 'td-app@gmail.com' - } - success { - mail bcc: 'td-app@gmail.com', body: '''Build complete - -Landmark Technologies''', cc: 'td-app@gmail.com', from: '', replyTo: '', subject: 'Build succeed', to: 'td-app@gmail.com' - } - } - } diff --git a/Jenkinscohort6 b/Jenkinscohort6 deleted file mode 100644 index bd852c86..00000000 --- a/Jenkinscohort6 +++ /dev/null @@ -1,53 +0,0 @@ - pipeline{ - agent any - tools{ - maven "maven3.8.4" - } -stages{ - stage('1.GitClone'){ - steps{ - sh "echo Github cloning" - git 'https://github.com/team16flight/web-app.git' - } -} -stage('2.MavenBuild'){ - steps{ - sh "echo build packages" - sh "mvn clean package" -} -} -stage('3.testingtheCode'){ - steps{ - sh "mvn sonar:sonar" - } - } -stage('4.backupArchitfacts'){ - steps{ - sh "mvn deploy" - } - } - stage('5.Deploytostaging'){ - steps{ - deploy adapters: [tomcat9(credentialsId: 'tomcat_Cred', path: '', url: 'http://54.226.211.219:7000/')], contextPath: null, war: 'target/*.war' - } - } - stage('6.Approval'){ - steps{ - sh "echo Approval Needed" - timeout(time:5,unit:'DAYS'){ - input message:'Approval for Production' - } - } -} - stage('7.Deploytostaging'){ - steps{ - deploy adapters: [tomcat9(credentialsId: 'tomcat_Cred', path: '', url: 'http://54.226.211.219:7000/')], contextPath: null, war: 'target/*.war' - } - } - stage('8.Emailnotification'){ - steps{ - emailext body: 'The build is success', subject: 'Build Success', to: 'acada@acadalearning.com' - } - } -} -} diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 9d535a5f..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,23 +0,0 @@ -node{ - def MHD = tool name: "maven3.8.4" - stage('code'){ - git branch: 'development', url: 'https://github.com/team16flight/web-app.git' - } - stage('BUILD'){ - sh "${MHD}/bin/mvn clean package" - - } - /* - stage('deploy'){ - sshagent(['tomcat']) { - sh "scp -o StrictHostKeyChecking=no target/*war ec2-user@172.31.15.31:/opt/tomcat9/webapps/" -} -} -stage('email'){ -emailext body: '''Build is over - -Acada -437212483''', recipientProviders: [developers(), requestor()], subject: 'Build', to: 'tdapp@gmail.com' -} - */ -} diff --git a/Jenkinsfile-scripted b/Jenkinsfile-scripted deleted file mode 100644 index 02657d15..00000000 --- a/Jenkinsfile-scripted +++ /dev/null @@ -1,39 +0,0 @@ -//scripted pipeline -node{ - def MHD = tool name: "maven3.8.4" - stage('1.Initiation'){ - sh "echo Start of td deployment" - } - stage('2.CloneCode'){ - git branch: 'stage', credentialsId: 'GitHubCredentials', url: 'https://github.com/team16flight/web-app.git' - } - stage('3.buildMaven'){ - sh "${MHD}/bin/mvn package" - } - stage('4.CodeQuality'){ - //sh "${MHD}/bin/mvn sonar:sonar" - } - stage('5.UploadArtifacts'){ - //sh "${MHD}/bin/mvn deploy" - } - stage('6.Deploy2Stage'){ - sshagent(['32d5fb4f-d92f-4a10-9f12-2738eab55fcc']) { - sh "scp -o StrictHostKeyChecking=no target/*war ec2-user@172.31.15.31:/opt/tomcat9/webapps/app" -} - -} - } - stage('7.Approval'){ - timeout(time:5, unit:'DAYS'){ - input message: 'Approval for production' - - } - stage('8.deployToProd'){ - sshagent(['32d5fb4f-d92f-4a10-9f12-2738eab55fcc']) { - sh "scp -o StrictHostKeyChecking=no target/*war ec2-user@172.31.15.31:/opt/tomcat9/webapps/" -} - - } -} - - diff --git a/cohort9 b/cohort9 deleted file mode 100644 index fcaf91c8..00000000 --- a/cohort9 +++ /dev/null @@ -1,51 +0,0 @@ - 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 deleted file mode 100644 index 8d77c99f..00000000 --- a/jenkins-cohort8 +++ /dev/null @@ -1,34 +0,0 @@ -//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/jenkinsfilecohort7 b/jenkinsfilecohort7 deleted file mode 100644 index dd386e3d..00000000 --- a/jenkinsfilecohort7 +++ /dev/null @@ -1,50 +0,0 @@ -pipeline{ - agent any - tools{ - maven "maven3.8.4" - } - stages{ - stage("1.CodeClone"){ - steps{ - git credentialsId: 'Github-Cred', url: 'https://github.com/team16flight/web-app.git' - } - } - stage("2.Build"){ - steps{ - sh "mvn clean package" - } - } - stage("3.CodeQuality"){ - steps{ - sh "mvn sonar:sonar" - } - } - stage("4.Artifacts"){ - steps{ - sh "mvn deploy" - } - } - stage("5.DeploytoUAT"){ - steps{ - deploy adapters: [tomcat9(credentialsId: 'tomcat-cred', path: '', url: 'http://54.226.118.23:8080/')], contextPath: null, war: 'target/*.war' - } - } - stage("6.Approval"){ - steps{ - timeout(time:5, unit:'DAYS'){ - input message: 'Approval for Production' - } - } - } - stage("7.deploytoPROD"){ - steps{ - deploy adapters: [tomcat9(credentialsId: 'tomcat-cred', path: '', url: 'http://54.226.118.23:8080/')], contextPath: null, war: 'target/*.war' - } - } - stage("8.EmailNotification"){ - steps{ - emailext body: 'This is Build Success', subject: 'Build Success', to: 'info@acadalearning.com' - } - } - } -} diff --git a/pom.xml b/pom.xml index bba48085..45752962 100644 --- a/pom.xml +++ b/pom.xml @@ -5,14 +5,14 @@ com.mt maven-web-application war - 2.0.7-SNAPSHOT + 1.0.0-RELEASE maven-web-application Maven Web Project for Java Project - ACADA Learning + Dev Consults http://acadalearning.com/ @@ -21,7 +21,7 @@ 5.1.2.RELEASE 4.11 1.2.17 - http://172.31.20.235:9000/ + http://172.31.12.154:9000/ admin admin UTF-8 @@ -96,14 +96,14 @@ nexus - ACADA Learning Releases Nexus Repository - http://172.31.27.56:8081/repository/rbc-release/ + Dev Consults Releases Nexus Repository + http://172.31.12.154:8081/repository/rbc-release/ nexus - ACADA Learning Snapshot Nexus Repository - http://172.31.27.56:8081/repository/rbc-snapshot/ + Dev Consults Snapshot Nexus Repository + http://172.31.12.154:8081/repository/rbc-snapshot/ diff --git a/target/classes/com/mt/services/EmployeeService.class b/target/classes/com/mt/services/EmployeeService.class new file mode 100644 index 00000000..a1bed3e4 Binary files /dev/null and b/target/classes/com/mt/services/EmployeeService.class differ diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties new file mode 100644 index 00000000..5941e351 --- /dev/null +++ b/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Sun Apr 21 02:02:21 UTC 2024 +groupId=com.mt +artifactId=maven-web-application +version=1.0.0-RELEASE diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 00000000..ba74768c --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1 @@ +com/mt/services/EmployeeService.class diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 00000000..7a0ac39b --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1 @@ +/home/ubuntu/pipelineproject/web-app/src/main/java/com/mt/services/EmployeeService.java diff --git a/target/web-app.war b/target/web-app.war new file mode 100644 index 00000000..e48304ed Binary files /dev/null and b/target/web-app.war differ diff --git a/target/web-app/WEB-INF/classes/com/mt/services/EmployeeService.class b/target/web-app/WEB-INF/classes/com/mt/services/EmployeeService.class new file mode 100644 index 00000000..a1bed3e4 Binary files /dev/null and b/target/web-app/WEB-INF/classes/com/mt/services/EmployeeService.class differ diff --git a/target/web-app/WEB-INF/lib/json-20160212.jar b/target/web-app/WEB-INF/lib/json-20160212.jar new file mode 100644 index 00000000..21e09dbc Binary files /dev/null and b/target/web-app/WEB-INF/lib/json-20160212.jar differ diff --git a/target/web-app/WEB-INF/lib/spring-aop-5.1.2.RELEASE.jar b/target/web-app/WEB-INF/lib/spring-aop-5.1.2.RELEASE.jar new file mode 100644 index 00000000..156a814b Binary files /dev/null and b/target/web-app/WEB-INF/lib/spring-aop-5.1.2.RELEASE.jar differ diff --git a/target/web-app/WEB-INF/lib/spring-beans-5.1.2.RELEASE.jar b/target/web-app/WEB-INF/lib/spring-beans-5.1.2.RELEASE.jar new file mode 100644 index 00000000..96197f0c Binary files /dev/null and b/target/web-app/WEB-INF/lib/spring-beans-5.1.2.RELEASE.jar differ diff --git a/target/web-app/WEB-INF/lib/spring-context-5.1.2.RELEASE.jar b/target/web-app/WEB-INF/lib/spring-context-5.1.2.RELEASE.jar new file mode 100644 index 00000000..a6dc3464 Binary files /dev/null and b/target/web-app/WEB-INF/lib/spring-context-5.1.2.RELEASE.jar differ diff --git a/target/web-app/WEB-INF/lib/spring-core-5.1.2.RELEASE.jar b/target/web-app/WEB-INF/lib/spring-core-5.1.2.RELEASE.jar new file mode 100644 index 00000000..81c2b905 Binary files /dev/null and b/target/web-app/WEB-INF/lib/spring-core-5.1.2.RELEASE.jar differ diff --git a/target/web-app/WEB-INF/lib/spring-expression-5.1.2.RELEASE.jar b/target/web-app/WEB-INF/lib/spring-expression-5.1.2.RELEASE.jar new file mode 100644 index 00000000..577ccee9 Binary files /dev/null and b/target/web-app/WEB-INF/lib/spring-expression-5.1.2.RELEASE.jar differ diff --git a/target/web-app/WEB-INF/lib/spring-jcl-5.1.2.RELEASE.jar b/target/web-app/WEB-INF/lib/spring-jcl-5.1.2.RELEASE.jar new file mode 100644 index 00000000..d9117a8b Binary files /dev/null and b/target/web-app/WEB-INF/lib/spring-jcl-5.1.2.RELEASE.jar differ diff --git a/target/web-app/WEB-INF/lib/spring-web-5.1.2.RELEASE.jar b/target/web-app/WEB-INF/lib/spring-web-5.1.2.RELEASE.jar new file mode 100644 index 00000000..b8bbed36 Binary files /dev/null and b/target/web-app/WEB-INF/lib/spring-web-5.1.2.RELEASE.jar differ diff --git a/target/web-app/WEB-INF/lib/spring-webmvc-5.1.2.RELEASE.jar b/target/web-app/WEB-INF/lib/spring-webmvc-5.1.2.RELEASE.jar new file mode 100644 index 00000000..8f58164d Binary files /dev/null and b/target/web-app/WEB-INF/lib/spring-webmvc-5.1.2.RELEASE.jar differ diff --git a/target/web-app/WEB-INF/mt-servlet.xml b/target/web-app/WEB-INF/mt-servlet.xml new file mode 100644 index 00000000..81c4f075 --- /dev/null +++ b/target/web-app/WEB-INF/mt-servlet.xml @@ -0,0 +1,26 @@ + + + + + + + + + + \ No newline at end of file diff --git a/target/web-app/WEB-INF/web.xml b/target/web-app/WEB-INF/web.xml new file mode 100644 index 00000000..c62e24c6 --- /dev/null +++ b/target/web-app/WEB-INF/web.xml @@ -0,0 +1,23 @@ + + + maven-web-application + + contextConfigLocation + /WEB-INF/mt-servlet.xml + + + mt + org.springframework.web.servlet.DispatcherServlet + 1 + + + mt + /services/* + + + org.springframework.web.context.ContextLoaderListener + + + /jsps/home.jsp + + \ No newline at end of file diff --git a/target/web-app/images/DP black.png b/target/web-app/images/DP black.png new file mode 100644 index 00000000..00f1eecb Binary files /dev/null and b/target/web-app/images/DP black.png differ diff --git a/target/web-app/jsps/home.jsp b/target/web-app/jsps/home.jsp new file mode 100644 index 00000000..4d97dd0f --- /dev/null +++ b/target/web-app/jsps/home.jsp @@ -0,0 +1,52 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="java.net.*" %> + + + + +AcadaLearning- Home Page + + + + +

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 with multiple job offers, Amen

+
+
+

Server Side IP Address


+ +<% +String ip = ""; +InetAddress inetAddress = InetAddress.getLocalHost(); +ip = inetAddress.getHostAddress(); +out.println("Server Host Name :: "+inetAddress.getHostName()); +%> +
+<%out.println("Server IP Address :: "+ip);%> + + + +
+
+ + + + + Acada Learning, + Calgary, Alberta, Canada + +1 587 574 2233, + info@acadalearning.com +
+ Mail to Acada Learning +
+
+
+

Service : Get Employee Details

+
+
+

Acada Learning - Consultant, Training and Software Development

+

Copyrights 2022 by Acada Learning

+ + +