From 17facc3384e6b9c8f64b45b4fa327298636c5e97 Mon Sep 17 00:00:00 2001 From: prajwal Date: Tue, 27 Dec 2022 11:18:45 +0000 Subject: [PATCH 01/55] Prajwal commit --- Dockerfile | 3 - appspec.yml | 26 ----- buildspec.yml | 50 -------- cicd/01-Jenkinsfile-helloworld | 15 --- cicd/02-Jenkinsfile-maven-build | 13 --- cicd/03-Jenkinsfile-deploy-to-tomcat | 20 ---- ...sfile-docker-build-push-deploy-same-server | 41 ------- ...nkinsfile-docker-build-push-to-artifactory | 41 ------- ...docker-build-push-to-artifactory-condition | 48 -------- ...sh-to-artifactory-condition-shared-library | 29 ----- ...e-docker-build-push-deloy-different-server | 48 -------- ...insfile-sonarqube-docker-build-push-deploy | 54 --------- ...sonarqube-docker-build-push-anchore-deploy | 63 ---------- ...er-build-push-anchore-deploy-to-kubernetes | 43 ------- cicd/Jenkinsfile | 72 ------------ cicd/Jenkinsfile-add-comment-in-github-pr | 41 ------- cicd/docker-agent/01-Jenkinsfile | 51 --------- codedeploy/scripts/after_install.sh | 4 - codedeploy/scripts/application_start.sh | 4 - codedeploy/scripts/application_stop.sh | 3 - codedeploy/scripts/before_install.sh | 5 - codedeploy/scripts/validate_service.sh | 3 - deployment/deployment.yaml | 37 ------ deployment/dev/secrets.yaml | Bin 127 -> 0 bytes deployment/prod/secrets.yaml | Bin 124 -> 0 bytes deployment/staging/secrets.yaml | Bin 124 -> 0 bytes pom.xml | 108 ++++++++++++------ sonar-project.properties | 10 -- src/main/webapp/index.jsp | 6 +- 29 files changed, 74 insertions(+), 764 deletions(-) delete mode 100644 Dockerfile delete mode 100644 appspec.yml delete mode 100644 buildspec.yml delete mode 100644 cicd/01-Jenkinsfile-helloworld delete mode 100644 cicd/02-Jenkinsfile-maven-build delete mode 100644 cicd/03-Jenkinsfile-deploy-to-tomcat delete mode 100644 cicd/04-Jenkinsfile-docker-build-push-deploy-same-server delete mode 100644 cicd/05-Jenkinsfile-docker-build-push-to-artifactory delete mode 100644 cicd/06-Jenkinsfile-docker-build-push-to-artifactory-condition delete mode 100644 cicd/07-Jenkinsfile-docker-build-push-to-artifactory-condition-shared-library delete mode 100644 cicd/08-Jenkinsfile-docker-build-push-deloy-different-server delete mode 100644 cicd/09-Jenkinsfile-sonarqube-docker-build-push-deploy delete mode 100644 cicd/10-Jenkinsfile-sonarqube-docker-build-push-anchore-deploy delete mode 100644 cicd/11-Jenkinsfile-sonarqube-docker-build-push-anchore-deploy-to-kubernetes delete mode 100644 cicd/Jenkinsfile delete mode 100644 cicd/Jenkinsfile-add-comment-in-github-pr delete mode 100644 cicd/docker-agent/01-Jenkinsfile delete mode 100644 codedeploy/scripts/after_install.sh delete mode 100644 codedeploy/scripts/application_start.sh delete mode 100644 codedeploy/scripts/application_stop.sh delete mode 100644 codedeploy/scripts/before_install.sh delete mode 100644 codedeploy/scripts/validate_service.sh delete mode 100644 deployment/deployment.yaml delete mode 100644 deployment/dev/secrets.yaml delete mode 100644 deployment/prod/secrets.yaml delete mode 100644 deployment/staging/secrets.yaml delete mode 100644 sonar-project.properties diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 4a3d0e40a4..0000000000 --- a/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -From tomcat:8-jre8 - -COPY ./target/hello-world.war /usr/local/tomcat/webapps diff --git a/appspec.yml b/appspec.yml deleted file mode 100644 index be162347a6..0000000000 --- a/appspec.yml +++ /dev/null @@ -1,26 +0,0 @@ -version: 0.0 -os: linux -# files: -# - source: / -# destination: /var/www/html/WordPress -hooks: - ApplicationStop: - - location: codedeploy/scripts/application_stop.sh - timeout: 300 - runas: root - BeforeInstall: - - location: codedeploy/scripts/before_install.sh - timeout: 300 - runas: root - AfterInstall: - - location: codedeploy/scripts/after_install.sh - timeout: 300 - runas: root - ApplicationStart: - - location: codedeploy/scripts/application_start.sh - timeout: 300 - runas: root - ValidateService: - - location: codedeploy/scripts/validate_service.sh - timeout: 3600 - runas: root diff --git a/buildspec.yml b/buildspec.yml deleted file mode 100644 index d7bf67a38a..0000000000 --- a/buildspec.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: 0.2 - -env: - variables: - IMAGE_REPO_NAME: "hello-world" - AWS_ACCOUNT_ID: "616853969531" - parameter-store: - DOCKER_PASSWORD: /codeBuild/dockerPassword - -phases: - install: - runtime-versions: - java: corretto8 - commands: - - yum install -y maven - finally: - - java -version - - mvn --version - pre_build: - commands: - - echo Logging in to Dockerhub for docker pull limit... - - docker login -u vigneshsweekaran -p $DOCKER_PASSWORD - - echo Logging in to Amazon ECR... - - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com - build: - on-failure: ABORT - commands: - - echo Build started on `date` - - echo Maven build... - - mvn clean package - - echo Building the Docker image... - - docker build -t $IMAGE_REPO_NAME:$CODEBUILD_BUILD_NUMBER . - - docker tag $IMAGE_REPO_NAME:$CODEBUILD_BUILD_NUMBER $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$CODEBUILD_BUILD_NUMBER - - docker tag $IMAGE_REPO_NAME:$CODEBUILD_BUILD_NUMBER $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest - post_build: - on-failure: ABORT - commands: - - echo Build completed on `date` - - echo Pushing the Docker image... - - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$CODEBUILD_BUILD_NUMBER - - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest - - sed -i "s/aws_region/$AWS_DEFAULT_REGION/" codedeploy/scripts/application_start.sh - - sed -i "s/repository_url/$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/" codedeploy/scripts/application_start.sh - - sed -i "s/image_url/$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com\/$IMAGE_REPO_NAME:$CODEBUILD_BUILD_NUMBER/" codedeploy/scripts/application_start.sh - -artifacts: - files: - - appspec.yml - - codedeploy/scripts/* - name: hello-world-build-artifacts diff --git a/cicd/01-Jenkinsfile-helloworld b/cicd/01-Jenkinsfile-helloworld deleted file mode 100644 index e32bc9dda9..0000000000 --- a/cicd/01-Jenkinsfile-helloworld +++ /dev/null @@ -1,15 +0,0 @@ -pipeline { - agent any - stages { - stage ('Build') { - steps { - sh 'echo Hello Build stage' - } - } - stage ('Test') { - steps { - sh 'echo hello Test stage' - } - } - } -} diff --git a/cicd/02-Jenkinsfile-maven-build b/cicd/02-Jenkinsfile-maven-build deleted file mode 100644 index 0e3fd6f046..0000000000 --- a/cicd/02-Jenkinsfile-maven-build +++ /dev/null @@ -1,13 +0,0 @@ -pipeline { - agent any - tools { - maven 'maven-3.6.3' - } - stages { - stage ('Build') { - steps { - sh 'mvn clean package' - } - } - } -} diff --git a/cicd/03-Jenkinsfile-deploy-to-tomcat b/cicd/03-Jenkinsfile-deploy-to-tomcat deleted file mode 100644 index a3c7cf3c4f..0000000000 --- a/cicd/03-Jenkinsfile-deploy-to-tomcat +++ /dev/null @@ -1,20 +0,0 @@ -pipeline { - agent any - tools { - maven 'maven-3.6.3' - } - stages { - stage ('Build') { - steps { - sh 'mvn clean package' - } - } - stage ('Deploy') { - steps { - script { - deploy adapters: [tomcat9(credentialsId: 'tomcat_credential', path: '', url: 'http://dayal-test.letspractice.tk:8081')], contextPath: '/pipeline', onFailure: false, war: 'webapp/target/*.war' - } - } - } - } -} diff --git a/cicd/04-Jenkinsfile-docker-build-push-deploy-same-server b/cicd/04-Jenkinsfile-docker-build-push-deploy-same-server deleted file mode 100644 index 35fc338a7b..0000000000 --- a/cicd/04-Jenkinsfile-docker-build-push-deploy-same-server +++ /dev/null @@ -1,41 +0,0 @@ -pipeline { - agent any - tools { - maven 'maven-3.6.3' - } - environment { - DATE = new Date().format('yy.M') - TAG = "${DATE}.${BUILD_NUMBER}" - } - stages { - stage ('Build') { - steps { - sh 'mvn clean package' - } - } - stage('Docker Build') { - steps { - script { - docker.build("vigneshsweekaran/hello-world:${TAG}") - } - } - } - stage('Pushing Docker Image to Dockerhub') { - steps { - script { - docker.withRegistry('https://registry.hub.docker.com', 'docker_credential') { - docker.image("vigneshsweekaran/hello-world:${TAG}").push() - docker.image("vigneshsweekaran/hello-world:${TAG}").push("latest") - } - } - } - } - stage('Deploy'){ - steps { - sh "docker stop hello-world | true" - sh "docker rm hello-world | true" - sh "docker run --name hello-world -d -p 9004:8080 vigneshsweekaran/hello-world:${TAG}" - } - } - } -} diff --git a/cicd/05-Jenkinsfile-docker-build-push-to-artifactory b/cicd/05-Jenkinsfile-docker-build-push-to-artifactory deleted file mode 100644 index b2f97fa8da..0000000000 --- a/cicd/05-Jenkinsfile-docker-build-push-to-artifactory +++ /dev/null @@ -1,41 +0,0 @@ -pipeline { - agent any - tools { - maven 'maven-3.6.3' - } - environment { - DATE = new Date().format('yy.M') - TAG = "${DATE}.${BUILD_NUMBER}" - } - stages { - stage ('Build') { - steps { - sh 'mvn clean package' - } - } - stage('Docker Build') { - steps { - script { - docker.build("default-docker-local/hello-world:${TAG}") - } - } - } - stage('Pushing Docker Image to Jfrog Artifactory') { - steps { - script { - docker.withRegistry('https://vigneshsweekaran.jfrog.io', 'artifactory-credential') { - docker.image("default-docker-local/hello-world:${TAG}").push() - docker.image("default-docker-local/hello-world:${TAG}").push("latest") - } - } - } - } - stage('Deploy'){ - steps { - sh "docker stop hello-world | true" - sh "docker rm hello-world | true" - sh "docker run --name hello-world -d -p 9004:8080 vigneshsweekaran.jfrog.io/default-docker-local/hello-world:${TAG}" - } - } - } -} diff --git a/cicd/06-Jenkinsfile-docker-build-push-to-artifactory-condition b/cicd/06-Jenkinsfile-docker-build-push-to-artifactory-condition deleted file mode 100644 index 1382ebf84e..0000000000 --- a/cicd/06-Jenkinsfile-docker-build-push-to-artifactory-condition +++ /dev/null @@ -1,48 +0,0 @@ -pipeline { - agent any - tools { - maven 'maven-3.6.3' - } - parameters { - choice(name: 'dockerRegistry', choices: ['Dockerhub', 'JfrogArtifactory'], description: 'Select Docker Registry') - } - environment { - DATE = new Date().format('yy.M') - TAG = "${DATE}.${BUILD_NUMBER}" - } - stages { - stage ('Build') { - steps { - sh 'mvn clean package' - } - } - stage('Docker build and push to Dockerhub') { - when { - environment name: 'dockerRegistry', value: 'Dockerhub' - } - steps { - script { - docker.build("vigneshsweekaran/hello-world:${TAG}") - docker.withRegistry("https://registry.hub.docker.com", 'docker_credential') { - docker.image("vigneshsweekaran/hello-world:${TAG}").push() - docker.image("vigneshsweekaran/hello-world:${TAG}").push("latest") - } - } - } - } - stage('Docker build and push to Jfrog Artifactory') { - when { - environment name: 'dockerRegistry', value: 'JfrogArtifactory' - } - steps { - script { - docker.build("default-docker-local/hello-world:${TAG}") - docker.withRegistry('https://vigneshsweekaran.jfrog.io', 'artifactory-credential') { - docker.image("default-docker-local/hello-world:${TAG}").push() - docker.image("default-docker-local/hello-world:${TAG}").push("latest") - } - } - } - } - } -} \ No newline at end of file diff --git a/cicd/07-Jenkinsfile-docker-build-push-to-artifactory-condition-shared-library b/cicd/07-Jenkinsfile-docker-build-push-to-artifactory-condition-shared-library deleted file mode 100644 index 647df591cc..0000000000 --- a/cicd/07-Jenkinsfile-docker-build-push-to-artifactory-condition-shared-library +++ /dev/null @@ -1,29 +0,0 @@ -@Library('library') _ - -pipeline { - agent any - tools { - maven 'maven-3.6.3' - } - parameters { - choice(name: 'dockerRegistry', choices: ['Dockerhub', 'JfrogArtifactory'], description: 'Select Docker Registry') - } - environment { - DATE = new Date().format('yy.M') - TAG = "${DATE}.${BUILD_NUMBER}" - } - stages { - stage ('Build') { - steps { - sh 'mvn clean package' - } - } - stage('Docker build and push to Docker Registry') { - steps { - script { - dockerBuildPush("${params.dockerRegistry}") - } - } - } - } -} \ No newline at end of file diff --git a/cicd/08-Jenkinsfile-docker-build-push-deloy-different-server b/cicd/08-Jenkinsfile-docker-build-push-deloy-different-server deleted file mode 100644 index d1135717f3..0000000000 --- a/cicd/08-Jenkinsfile-docker-build-push-deloy-different-server +++ /dev/null @@ -1,48 +0,0 @@ -pipeline { - agent any - tools { - maven 'maven-3.6.3' - } - environment { - DATE = new Date().format('yy.M') - TAG = "${DATE}.${BUILD_NUMBER}" - } - stages { - stage ('Build') { - steps { - sh 'mvn clean package' - } - } - stage('Docker Build') { - steps { - script { - docker.build("vigneshsweekaran/hello-world:${TAG}") - } - } - } - stage('Pushing Docker Image to Dockerhub') { - steps { - script { - docker.withRegistry('https://registry.hub.docker.com', 'docker_credential') { - docker.image("vigneshsweekaran/hello-world:${TAG}").push() - docker.image("vigneshsweekaran/hello-world:${TAG}").push("latest") - } - } - } - } - stage('Deploy'){ - steps { - withCredentials([sshUserPrivateKey(credentialsId: 'vm-key', keyFileVariable: 'SSH_PRIVATE_KEY_PATH')]) { - sh '''ssh -i $SSH_PRIVATE_KEY_PATH -o StrictHostKeyChecking=no ubuntu@jenkins.oc.devopspilot.com <T(W)!GVCyQZD#(JBk1R diff --git a/deployment/prod/secrets.yaml b/deployment/prod/secrets.yaml deleted file mode 100644 index 6e1e59f465f2f283623cabc660d067e55c7c8098..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 124 zcmV-?0E7PkM@dveQdv+`03T1mc675@j7;~HSmDdV;;JFzjXOUc;7-Gov4IfCxG4E? znH>#_SzoajALjr=gleIoJ^s)GO^L>#yZk3G^4zuQp#_SzoajALjr=gleIoJ^s)GO^L>#yZk3G^4zuQp + - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - - com.example - hello-world + + com.mcnz.rps.web + hello_world + 1.0 war - hello-world - http://maven.apache.org - 1.0-SNAPSHOT - hello-world - - ${project.artifactId} - - - - maven-compiler-plugin - - 1.6 - 1.6 - - - - org.mortbay.jetty - jetty-maven-plugin - - - + + + UTF-8 + 1.8 + 1.8 + + junit + junit + 4.11 + test + + + javax.servlet servlet-api 2.5 @@ -45,19 +39,57 @@ provided - - junit - junit - 3.8.1 - test - - - junit - junit - 4.12 - test - + + hello_world + + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + 2.0 + + maven-tomcat-war-deployment-server + http://43.204.36.46:8090/manager/text + /hello-world + + + + + + + + maven-clean-plugin + 3.0.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + + 1.8 + 1.8 + + + + maven-war-plugin + 3.2.0 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index 75da54e320..0000000000 --- a/sonar-project.properties +++ /dev/null @@ -1,10 +0,0 @@ -# Required metadata -sonar.projectKey=hello-world -sonar.projectName=Hello World -sonar.projectVersion=1.0 - -# Source information -sonar.sources=src/main -sonar.sourceEncoding=UTF-8 -sonar.language=java -sonar.java.binaries=target/classes diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 309db7885f..ec94513976 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -1,2 +1,4 @@ -

Hello DevOps Engineers Welcome !!

-

Deployed by Raghav and vignesh on 5 aug at chennai

+

Hello Welcome Team !!

+

This is Deployed by prajwal on

+

<% java.util.Date d = new java.util.Date(); + out.println(d.toString()); %>

From 5d585fa05787fa1a13c1ca6fdd70114ff2fdb8d2 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 30 Dec 2022 15:37:46 +0530 Subject: [PATCH 02/55] Create Poll Scm --- Poll Scm | 1 + 1 file changed, 1 insertion(+) create mode 100644 Poll Scm diff --git a/Poll Scm b/Poll Scm new file mode 100644 index 0000000000..8c3ae0603b --- /dev/null +++ b/Poll Scm @@ -0,0 +1 @@ +Check poll scm From 2ff8fc4b5471568d93dfc615fcfdb0f4206d4fda Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 30 Dec 2022 15:46:27 +0530 Subject: [PATCH 03/55] Create Webhook --- Webhook | 1 + 1 file changed, 1 insertion(+) create mode 100644 Webhook diff --git a/Webhook b/Webhook new file mode 100644 index 0000000000..b9a80aa62f --- /dev/null +++ b/Webhook @@ -0,0 +1 @@ +Webhook check From beb3270ad2041c7f70d0bdaadc803c0b902161f3 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 30 Dec 2022 15:47:28 +0530 Subject: [PATCH 04/55] Update Webhook --- Webhook | 1 + 1 file changed, 1 insertion(+) diff --git a/Webhook b/Webhook index b9a80aa62f..ce829722a5 100644 --- a/Webhook +++ b/Webhook @@ -1 +1,2 @@ Webhook check +1 From 0c02536768c860aee4a2ac39bc4c33e6ea26321a Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 30 Dec 2022 15:49:51 +0530 Subject: [PATCH 05/55] Delete Poll Scm --- Poll Scm | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Poll Scm diff --git a/Poll Scm b/Poll Scm deleted file mode 100644 index 8c3ae0603b..0000000000 --- a/Poll Scm +++ /dev/null @@ -1 +0,0 @@ -Check poll scm From 389162cbf45a0de958446c128300fb4fe5ae46f5 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 30 Dec 2022 15:52:25 +0530 Subject: [PATCH 06/55] Update Webhook --- Webhook | 1 - 1 file changed, 1 deletion(-) diff --git a/Webhook b/Webhook index ce829722a5..b9a80aa62f 100644 --- a/Webhook +++ b/Webhook @@ -1,2 +1 @@ Webhook check -1 From 728c9b117de1a650b8437faaf10e72bddfa2fcfd Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 30 Dec 2022 17:19:59 +0530 Subject: [PATCH 07/55] Delete Webhook --- Webhook | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Webhook diff --git a/Webhook b/Webhook deleted file mode 100644 index b9a80aa62f..0000000000 --- a/Webhook +++ /dev/null @@ -1 +0,0 @@ -Webhook check From 427ce4c9e5cb102b48ffd28e90beeb6a4a1c4030 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 3 Jan 2023 14:42:04 +0530 Subject: [PATCH 08/55] Update README.md --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 9568d2ec65..fe0abaa99c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,4 @@ # Maven web application project - -### Clean fresh application code is available in hell-world-maven branch and hello-world-maven tag -To clone the hello-world-maven branch -``` -git clone -b hello-world-maven https://github.com/vigneshsweekaran/hello-world.git ``` ### To generate the package ``` From 915c3a0981ba530b830fd00cc643a86aa286cf02 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 3 Jan 2023 14:42:31 +0530 Subject: [PATCH 09/55] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fe0abaa99c..f63a3a0f62 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Maven web application project ``` -### To generate the package +# To generate the package ``` mvn clean package ``` -### War file is generated in target/hello-world.war +# War file is generated in target/hello-world.war From cf85ad19553841ef71f11e359d9959741817488a Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 3 Jan 2023 14:43:19 +0530 Subject: [PATCH 10/55] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f63a3a0f62..b10a1c0b0c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,6 @@ ``` # To generate the package ``` -mvn clean package +### mvn clean package ``` # War file is generated in target/hello-world.war From 516d651ff9cd675b5a583c85b4eb56a97498efcd Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 6 Jan 2023 08:10:12 +0530 Subject: [PATCH 11/55] Create Jenkinsfile --- Jenkinsfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000..5850b359bd --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,30 @@ +pipeline { + agent none + + stages { + stage('CHECKOUT') { + agent {label 'slave01'} + steps { + git branch: 'main', url: 'https://github.com/prajwal1691/hello-world' + sh 'sleep 5' + } + + } + stage('BUILD') { + agent {label 'slave01'} + steps { + sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline + mvn clean install''' + sh 'sleep 10' + } + } + stage('DEPLOY') { + agent {label 'slave01'} + steps { + sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline/target + sudo cp *.war /opt/tomcat9/webapps''' + sh 'sleep 5' + } + } + } +} From 716aea8dbf17567fe653be58128ecfa77e3070bb Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 6 Jan 2023 08:23:17 +0530 Subject: [PATCH 12/55] Update Jenkinsfile --- Jenkinsfile | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5850b359bd..f67830dac9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,29 +1,18 @@ pipeline { - agent none + agent {label 'slave01'} stages { - stage('CHECKOUT') { - agent {label 'slave01'} + stage('BUILD') { steps { git branch: 'main', url: 'https://github.com/prajwal1691/hello-world' - sh 'sleep 5' - } - - } - stage('BUILD') { - agent {label 'slave01'} - steps { - sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline + sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline mvn clean install''' - sh 'sleep 10' - } + } } stage('DEPLOY') { - agent {label 'slave01'} steps { sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline/target sudo cp *.war /opt/tomcat9/webapps''' - sh 'sleep 5' } } } From a79a2fcd9ac32d3a39b42f0b451828303740368a Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 6 Jan 2023 08:26:34 +0530 Subject: [PATCH 13/55] Update Jenkinsfile From f9da3cf52918247436731510b9e85066eb6d2e14 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 6 Jan 2023 08:29:01 +0530 Subject: [PATCH 14/55] Update Jenkinsfile --- Jenkinsfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f67830dac9..052785e30b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,10 +2,14 @@ pipeline { agent {label 'slave01'} stages { - stage('BUILD') { + stage('CHECKOUT') { steps { git branch: 'main', url: 'https://github.com/prajwal1691/hello-world' - sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline + } + } + stage('BUILD') { + steps { + sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline mvn clean install''' } } From edd84ab44cb29611a9e5f219f9fda32642fe07ce Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Fri, 6 Jan 2023 08:29:57 +0530 Subject: [PATCH 15/55] Update Jenkinsfile --- Jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 052785e30b..cb67772c85 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,19 +1,22 @@ pipeline { - agent {label 'slave01'} + agent none stages { stage('CHECKOUT') { + agent {label 'slave01'} steps { git branch: 'main', url: 'https://github.com/prajwal1691/hello-world' } } stage('BUILD') { + agent {label 'slave01'} steps { sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline mvn clean install''' } } stage('DEPLOY') { + agent {label 'slave01'} steps { sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline/target sudo cp *.war /opt/tomcat9/webapps''' From c21576f8ed72043a4b8f9f3dcff90b923b2d4a1a Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:41:48 +0530 Subject: [PATCH 16/55] Update Jenkinsfile --- Jenkinsfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index cb67772c85..9f0f3b9abb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,10 +10,16 @@ pipeline { } stage('BUILD') { agent {label 'slave01'} - steps { - sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline - mvn clean install''' + parallel { + stage ('Change Directory') + steps { + sh 'cd /home/ec2-user/jenkins/workspace/agentpipeline' + stage ('Maven install') + steps { + sh 'mvn clean install' + } } + } } stage('DEPLOY') { agent {label 'slave01'} From cbad00bc40c84fd32b5d029b50532cf0d2d072f6 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:43:07 +0530 Subject: [PATCH 17/55] Update Jenkinsfile --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9f0f3b9abb..75a4e24685 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,13 +11,15 @@ pipeline { stage('BUILD') { agent {label 'slave01'} parallel { - stage ('Change Directory') + stage ('Change Directory') { steps { sh 'cd /home/ec2-user/jenkins/workspace/agentpipeline' - stage ('Maven install') + stage ('Maven install') { steps { sh 'mvn clean install' } + } + } } } } From eab101d6c344cb49d1163ef32d671eeb628f85df Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:43:37 +0530 Subject: [PATCH 18/55] Update Jenkinsfile --- Jenkinsfile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 75a4e24685..cb67772c85 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,18 +10,10 @@ pipeline { } stage('BUILD') { agent {label 'slave01'} - parallel { - stage ('Change Directory') { - steps { - sh 'cd /home/ec2-user/jenkins/workspace/agentpipeline' - stage ('Maven install') { - steps { - sh 'mvn clean install' - } - } - } + steps { + sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline + mvn clean install''' } - } } stage('DEPLOY') { agent {label 'slave01'} From c1e1062a430bace4d494f5d1204358a8ea54482c Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:57:12 +0530 Subject: [PATCH 19/55] Update Jenkinsfile --- Jenkinsfile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index cb67772c85..c954d2fd83 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,10 +10,16 @@ pipeline { } stage('BUILD') { agent {label 'slave01'} - steps { - sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline - mvn clean install''' - } + pipeline { + stage('Change directory'){ + steps { + sh 'cd /home/ec2-user/jenkins/workspace/agentpipeline' + } + steps { + sh 'mvn clean install' + } + + } } stage('DEPLOY') { agent {label 'slave01'} @@ -24,3 +30,4 @@ pipeline { } } } + From 4f32d8524824a9263e0cfe79c38949476b9e4653 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:58:44 +0530 Subject: [PATCH 20/55] Update Jenkinsfile --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c954d2fd83..2a3bb5cec9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,4 +30,3 @@ pipeline { } } } - From 8cee9ba94e97059d3d584150b3af41a557287cd8 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:59:43 +0530 Subject: [PATCH 21/55] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2a3bb5cec9..59f3752e72 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { } stage('BUILD') { agent {label 'slave01'} - pipeline { + parallel { stage('Change directory'){ steps { sh 'cd /home/ec2-user/jenkins/workspace/agentpipeline' From 2f6726311fa88ee2ac63af3e939e7132b247f49f Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 10 Jan 2023 21:00:39 +0530 Subject: [PATCH 22/55] Update Jenkinsfile --- Jenkinsfile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 59f3752e72..cb67772c85 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,16 +10,10 @@ pipeline { } stage('BUILD') { agent {label 'slave01'} - parallel { - stage('Change directory'){ - steps { - sh 'cd /home/ec2-user/jenkins/workspace/agentpipeline' - } - steps { - sh 'mvn clean install' - } - - } + steps { + sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline + mvn clean install''' + } } stage('DEPLOY') { agent {label 'slave01'} From 71939f8e12755ee2c4f2b592085fbe8946a5dcb9 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 10 Jan 2023 21:06:39 +0530 Subject: [PATCH 23/55] Create pr check --- pr check | 1 + 1 file changed, 1 insertion(+) create mode 100644 pr check diff --git a/pr check b/pr check new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/pr check @@ -0,0 +1 @@ + From aa55239f5a6b38199d08a9147372051c11bda4df Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 10 Jan 2023 21:07:35 +0530 Subject: [PATCH 24/55] Update pr check --- pr check | 1 + 1 file changed, 1 insertion(+) diff --git a/pr check b/pr check index 8b13789179..9b01990023 100644 --- a/pr check +++ b/pr check @@ -1 +1,2 @@ +pr check From f02fb2974b2f0b87ab679bd1cd6a2fa898ff387e Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Tue, 10 Jan 2023 21:10:39 +0530 Subject: [PATCH 25/55] Delete pr check --- pr check | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 pr check diff --git a/pr check b/pr check deleted file mode 100644 index 9b01990023..0000000000 --- a/pr check +++ /dev/null @@ -1,2 +0,0 @@ - -pr check From e348476bc0c3d2474507cb2e009b2bdaed4135af Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Wed, 11 Jan 2023 17:26:36 +0530 Subject: [PATCH 26/55] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index cb67772c85..38b9bcf75d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,7 +19,7 @@ pipeline { agent {label 'slave01'} steps { sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline/target - sudo cp *.war /opt/tomcat9/webapps''' + sudo cp *.war /opt/tomcat10/webapps''' } } } From c1a989e141501c0a9fc0c9d7e854c848c55bd0e4 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Wed, 11 Jan 2023 17:50:48 +0530 Subject: [PATCH 27/55] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 38b9bcf75d..d10f89baad 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,14 +11,14 @@ pipeline { stage('BUILD') { agent {label 'slave01'} steps { - sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline + sh '''cd /home/ec2-user/jenkins/workspace/hello-world mvn clean install''' } } stage('DEPLOY') { agent {label 'slave01'} steps { - sh '''cd /home/ec2-user/jenkins/workspace/agentpipeline/target + sh '''cd /home/ec2-user/jenkins/workspace/hello-world/target sudo cp *.war /opt/tomcat10/webapps''' } } From d2a2fa4a2b10b52a723605d7dcb8e7478fed7f93 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Wed, 1 Feb 2023 19:37:32 +0530 Subject: [PATCH 28/55] Create Dockerfile --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..63c58c7d36 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM ubuntu +RUN sudo yum install -y maven +RUN mvn clean install From 7988709a29b99c83ba2a355bc1419b19e0961bed Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Wed, 1 Feb 2023 19:38:45 +0530 Subject: [PATCH 29/55] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 63c58c7d36..1c7eabc8e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM ubuntu -RUN sudo yum install -y maven +RUN sudo apt-get install -y maven RUN mvn clean install From 360128c5410aa0532814d819448653279b0fc3fb Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Wed, 1 Feb 2023 19:39:39 +0530 Subject: [PATCH 30/55] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1c7eabc8e9..048071a006 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ FROM ubuntu -RUN sudo apt-get install -y maven +RUN apt-get update +RUN apt-get install -y maven RUN mvn clean install From 0122fc3dde8c9d4422e20d4204f67e626868aeac Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Wed, 1 Feb 2023 20:04:48 +0530 Subject: [PATCH 31/55] Update Dockerfile --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 048071a006..8c2edb4031 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,7 @@ FROM ubuntu RUN apt-get update +RUN apt-get install -y git +RUN git clone https://github.com/prajwal1691/hello-world.git RUN apt-get install -y maven +WORKDIR /hello-world RUN mvn clean install From c977a2d5578c43df08bc386d0e246ab566114a6d Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Thu, 2 Feb 2023 15:05:26 +0530 Subject: [PATCH 32/55] Update index.jsp --- src/main/webapp/index.jsp | 52 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index ec94513976..f5a488c6e2 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -1,4 +1,48 @@ -

Hello Welcome Team !!

-

This is Deployed by prajwal on

-

<% java.util.Date d = new java.util.Date(); - out.println(d.toString()); %>

+ + + + + Wall Paint Industry + + + +
+

Wall Paint Industry

+ +
+
+
+

Our Products

+

Here is a list of our wall paint products:

+
    +
  • Matte Finish Paint
  • +
  • Satin Finish Paint
  • +
  • Gloss Finish Paint
  • +
  • Textured Finish Paint
  • +
+
+
+

About Us

+

We are a leading wall paint industry, providing high-quality paints for all your needs.

+
+
+

Contact Us

+
+ + + + +
+
+
+
+

Copyright © Wall Paint Industry

+
+ + From 0f721070a3bbfff90ea606c2c84ce4f0feaff251 Mon Sep 17 00:00:00 2001 From: Prajwal J <118866033+prajwal1691@users.noreply.github.com> Date: Thu, 2 Feb 2023 15:09:40 +0530 Subject: [PATCH 33/55] Update index.jsp --- src/main/webapp/index.jsp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index f5a488c6e2..1dcdd301f7 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -2,12 +2,12 @@ - Wall Paint Industry + Website created by prajwal
-

Wall Paint Industry

+

Prajwal's Company