From ca275b1f96aa8cf04c87709b68c0b9a61e8923c9 Mon Sep 17 00:00:00 2001 From: sammana9 <75558869+sammana9@users.noreply.github.com> Date: Sat, 29 May 2021 20:37:57 +0530 Subject: [PATCH 1/6] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6a9e95ed..b14f5696 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ pipeline { stage('compile') { steps { echo 'compiling..' - git url: 'https://github.com/lerndevops/DevOpsClassCodes' + git url: 'https://github.com/sammana9/DevOpsClassCodes' sh script: '/opt/apache-maven-3.6.3/bin/mvn compile' } } From d688217ccabc7e8f78d9e41fbdb414999480c738 Mon Sep 17 00:00:00 2001 From: sammana9 <75558869+sammana9@users.noreply.github.com> Date: Tue, 1 Jun 2021 10:21:45 +0530 Subject: [PATCH 2/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b7fa775..90422840 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -Sample Java Applicaiton V1.5. +Sample Java Applicaiton V1.4. From 2939a1169c8df333f8908fa801db18d2c50a7b26 Mon Sep 17 00:00:00 2001 From: sammana9 <75558869+sammana9@users.noreply.github.com> Date: Wed, 2 Jun 2021 18:58:23 +0530 Subject: [PATCH 3/6] Update Jenkinsfile --- Jenkinsfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b14f5696..242ee965 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,17 +1,22 @@ pipeline { agent any + + tools{ + maven 'Maven3.6' + } + stages { stage('compile') { steps { echo 'compiling..' git url: 'https://github.com/sammana9/DevOpsClassCodes' - sh script: '/opt/apache-maven-3.6.3/bin/mvn compile' + sh 'mvn compile' } } stage('codereview-pmd') { steps { echo 'codereview..' - sh script: '/opt/apache-maven-3.6.3/bin/mvn -P metrics pmd:pmd' + sh 'mvn -P metrics pmd:pmd' } post { success { @@ -22,7 +27,7 @@ pipeline { stage('unit-test') { steps { echo 'unittest..' - sh script: '/opt/apache-maven-3.6.3/bin/mvn test' + sh 'mvn test' } post { success { @@ -33,7 +38,7 @@ pipeline { stage('codecoverate') { steps { echo 'codecoverage..' - sh script: '/opt/apache-maven-3.6.3/bin/mvn cobertura:cobertura -Dcobertura.report.format=xml' + sh 'mvn cobertura:cobertura -Dcobertura.report.format=xml' } post { success { @@ -44,7 +49,7 @@ pipeline { stage('package') { steps { echo 'package..' - sh script: '/opt/apache-maven-3.6.3/bin/mvn package' + sh 'mvn package' } } } From 5527629d3c37a07ffa122db84d0f9a25e19a553a Mon Sep 17 00:00:00 2001 From: sammana9 <75558869+sammana9@users.noreply.github.com> Date: Wed, 2 Jun 2021 19:17:16 +0530 Subject: [PATCH 4/6] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 242ee965..650fe6fd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { stage('compile') { steps { echo 'compiling..' - git url: 'https://github.com/sammana9/DevOpsClassCodes' + git url: 'https://github.com/sammana9/samplejavaapp' sh 'mvn compile' } } From d1fc5b0ce1ac42cf7f4b5f347b6e6fa045240f85 Mon Sep 17 00:00:00 2001 From: sammana9 <75558869+sammana9@users.noreply.github.com> Date: Wed, 2 Jun 2021 19:32:01 +0530 Subject: [PATCH 5/6] Update Jenkinsfile --- Jenkinsfile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 650fe6fd..b14f5696 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,22 +1,17 @@ pipeline { agent any - - tools{ - maven 'Maven3.6' - } - stages { stage('compile') { steps { echo 'compiling..' - git url: 'https://github.com/sammana9/samplejavaapp' - sh 'mvn compile' + git url: 'https://github.com/sammana9/DevOpsClassCodes' + sh script: '/opt/apache-maven-3.6.3/bin/mvn compile' } } stage('codereview-pmd') { steps { echo 'codereview..' - sh 'mvn -P metrics pmd:pmd' + sh script: '/opt/apache-maven-3.6.3/bin/mvn -P metrics pmd:pmd' } post { success { @@ -27,7 +22,7 @@ pipeline { stage('unit-test') { steps { echo 'unittest..' - sh 'mvn test' + sh script: '/opt/apache-maven-3.6.3/bin/mvn test' } post { success { @@ -38,7 +33,7 @@ pipeline { stage('codecoverate') { steps { echo 'codecoverage..' - sh 'mvn cobertura:cobertura -Dcobertura.report.format=xml' + sh script: '/opt/apache-maven-3.6.3/bin/mvn cobertura:cobertura -Dcobertura.report.format=xml' } post { success { @@ -49,7 +44,7 @@ pipeline { stage('package') { steps { echo 'package..' - sh 'mvn package' + sh script: '/opt/apache-maven-3.6.3/bin/mvn package' } } } From 80b5951dcc00f95dea49e0ed5039a3116d586594 Mon Sep 17 00:00:00 2001 From: sammana9 <75558869+sammana9@users.noreply.github.com> Date: Fri, 9 Jul 2021 01:40:40 +0530 Subject: [PATCH 6/6] Update deploy-kube.yml --- deploy/deploy-kube.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/deploy-kube.yml b/deploy/deploy-kube.yml index 0bef678f..0a41785e 100755 --- a/deploy/deploy-kube.yml +++ b/deploy/deploy-kube.yml @@ -14,7 +14,7 @@ echo "No app service found" fi - name: deploy app - command: kubectl create deploy myapp --image=lerndevops/samplejavaapp:{{ build }} + command: kubectl create deploy myapp --image=sammana/myimage:{{ build }} - name: increase replicas command: kubectl scale deploy myapp --replicas=2 - name: deploy service