From e0961f68bf652855e5b93b0e7e4b3b558d7dcd6c Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 18 Oct 2022 15:49:27 +0530 Subject: [PATCH 001/152] Update Jenkinsfile --- Jenkinsfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7c7a857..9a8991f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,18 +1,18 @@ pipeline { - agent any + agent docker-node environment { - DOCKERHUB_CREDENTIALS = credentials('valaxy-dockerhub') + DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } stages { stage('SCM Checkout') { steps{ - git 'https://github.com/ravdy/nodejs-demo.git' + git 'https://github.com/PottaAkhil/nodejs-demo.git' } } stage('Build docker image') { steps { - sh 'docker build -t valaxy/nodeapp:$BUILD_NUMBER .' + sh 'docker build -t success0510/nodeapp:$BUILD_NUMBER .' } } stage('login to dockerhub') { @@ -22,7 +22,7 @@ pipeline { } stage('push image') { steps{ - sh 'docker push valaxy/nodeapp:$BUILD_NUMBER' + sh 'docker push success0510/nodeapp:$BUILD_NUMBER' } } } @@ -32,4 +32,3 @@ post { } } } - From 4f19b927c1f287b5d8da9fe6792333dc274c00f6 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 18 Oct 2022 15:58:52 +0530 Subject: [PATCH 002/152] Update Jenkinsfile --- Jenkinsfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9a8991f..3bfaa89 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,12 +4,6 @@ pipeline { DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } stages { - stage('SCM Checkout') { - steps{ - git 'https://github.com/PottaAkhil/nodejs-demo.git' - } - } - stage('Build docker image') { steps { sh 'docker build -t success0510/nodeapp:$BUILD_NUMBER .' From 53fc2b75464fa2dc76785bab2146206ac66c266c Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:01:30 +0530 Subject: [PATCH 003/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3bfaa89..46c303a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent docker-node + agent {labe1 "docker-node"} environment { DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } From f1a538589799ece62eb499ceab0e67e1b0a51746 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:17:51 +0530 Subject: [PATCH 004/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 46c303a..158b10f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent {labe1 "docker-node"} + agent { labe1 "docker-node" } environment { DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } From 5e9f108651b5c4cbd5c1f860da76d090e8731e80 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:19:45 +0530 Subject: [PATCH 005/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 158b10f..f519eb7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent { labe1 "docker-node" } + agent any environment { DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } From be75c3e8f906db7e69ffd3b87872d4bce1638973 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:29:45 +0530 Subject: [PATCH 006/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f519eb7..0ccf8ac 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ pipeline { stages { stage('Build docker image') { steps { - sh 'docker build -t success0510/nodeapp:$BUILD_NUMBER .' + sh 'docker build -t PottaAkhil/nodeapp:$BUILD_NUMBER .' } } stage('login to dockerhub') { @@ -16,7 +16,7 @@ pipeline { } stage('push image') { steps{ - sh 'docker push success0510/nodeapp:$BUILD_NUMBER' + sh 'docker push PottaAkhil/nodeapp:$BUILD_NUMBER' } } } From 228d17d019e2a0f0623a6e0966da8634ef9a0b2d Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:33:20 +0530 Subject: [PATCH 007/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0ccf8ac..f519eb7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ pipeline { stages { stage('Build docker image') { steps { - sh 'docker build -t PottaAkhil/nodeapp:$BUILD_NUMBER .' + sh 'docker build -t success0510/nodeapp:$BUILD_NUMBER .' } } stage('login to dockerhub') { @@ -16,7 +16,7 @@ pipeline { } stage('push image') { steps{ - sh 'docker push PottaAkhil/nodeapp:$BUILD_NUMBER' + sh 'docker push success0510/nodeapp:$BUILD_NUMBER' } } } From 0d8d4a04bf1cb4a3ae51714e0afcb71aa3bd5dc8 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:56:18 +0530 Subject: [PATCH 008/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f519eb7..700cf31 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent any + agent { label1 "docker-node" } environment { DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } From 9ffcc73ec5272044d70103d3810931fd8b355a1e Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:19:03 +0530 Subject: [PATCH 009/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 700cf31..f519eb7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent { label1 "docker-node" } + agent any environment { DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } From b485e55d3f13b436cab81bd85148678d871e4855 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 19 Oct 2022 10:59:38 +0530 Subject: [PATCH 010/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f519eb7..8bec058 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ pipeline { stages { stage('Build docker image') { steps { - sh 'docker build -t success0510/nodeapp:$BUILD_NUMBER .' + sh 'docker build -t success0510/nodeapp-1.0 .' } } stage('login to dockerhub') { @@ -16,7 +16,7 @@ pipeline { } stage('push image') { steps{ - sh 'docker push success0510/nodeapp:$BUILD_NUMBER' + sh 'docker push success0510/nodeapp-1.0' } } } From 6b80237113cbf030cb9507dde91eb7a054a29771 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 19 Oct 2022 11:22:15 +0530 Subject: [PATCH 011/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8bec058..7455306 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent any + # agent any environment { DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } From 5870cfd21d7b0c3957f3c5ed286ff8366695d60a Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 19 Oct 2022 11:23:05 +0530 Subject: [PATCH 012/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7455306..ed9e8a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - # agent any + environment { DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } From d11a0045d479168e8042280775cac1d47de15975 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 19 Oct 2022 11:24:03 +0530 Subject: [PATCH 013/152] Update Jenkinsfile --- Jenkinsfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ed9e8a2..9a8991f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,12 +1,18 @@ pipeline { - + agent docker-node environment { DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } stages { + stage('SCM Checkout') { + steps{ + git 'https://github.com/PottaAkhil/nodejs-demo.git' + } + } + stage('Build docker image') { steps { - sh 'docker build -t success0510/nodeapp-1.0 .' + sh 'docker build -t success0510/nodeapp:$BUILD_NUMBER .' } } stage('login to dockerhub') { @@ -16,7 +22,7 @@ pipeline { } stage('push image') { steps{ - sh 'docker push success0510/nodeapp-1.0' + sh 'docker push success0510/nodeapp:$BUILD_NUMBER' } } } From 446b17dc0aa85e4c7f4d51b6c7a0a980aff5ea7d Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 19 Oct 2022 12:09:17 +0530 Subject: [PATCH 014/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9a8991f..fc8774b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent docker-node + agent {label 'docker-node'} environment { DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') } From 8757f27eac03475806a0e7028e467335f3ff245c Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 19 Oct 2022 12:24:41 +0530 Subject: [PATCH 015/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index fc8774b..5d9c2c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent {label 'docker-node'} environment { - DOCKERHUB_CREDENTIALS = credentials('docker-hub-login') + DOCKERHUB_CREDENTIALS = credentials('docker-hub') } stages { stage('SCM Checkout') { From a895af2fc3e866468961e2538da356ec74c362a8 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 13:19:19 +0530 Subject: [PATCH 016/152] Create deploymentservice.yaml --- deploymentservice.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 deploymentservice.yaml diff --git a/deploymentservice.yaml b/deploymentservice.yaml new file mode 100644 index 0000000..000bb38 --- /dev/null +++ b/deploymentservice.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment # Kubernetes resource kind we are creating +metadata: + name: nodejs-k8s-deployment +spec: + selector: + matchLabels: + app: nodejs-k8s + replicas: 2 # Number of replicas that will be created for this deployment + template: + metadata: + labels: + app: nodejs-k8s + spec: + containers: + - name: nodejs-k8s + image: success0510/nodeapp:$BUILD_NUMBER' # Image that will be used to containers in the cluster + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 # The port that the container is running on in the cluster + + +--- + +apiVersion: v1 # Kubernetes API version +kind: Service # Kubernetes resource kind we are creating +metadata: # Metadata of the resource kind we are creating + name: nodejs-k8ssvc +spec: + selector: + app: nodejst-k8s + ports: + - protocol: "TCP" + port: 8080 # The port that the service is running on in the cluster + targetPort: 8080 # The port exposed by the service + type: NodePort # type of the service. From bd718a67f36561da15b697320aad718a5f53e1e3 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 13:28:24 +0530 Subject: [PATCH 017/152] Update Jenkinsfile --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5d9c2c1..0be93f9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,9 +26,12 @@ pipeline { } } } -post { - always { - sh 'docker logout' +stage('Deploy to k8s'){ + steps{ + script{ + kubernetesDeploy (configs: 'deploymentservice.yaml',kubeconfigId: 'k8s') + } + } } } } From d3c35cf39e5d24683ec313512adc25b3d6a82df2 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 13:33:09 +0530 Subject: [PATCH 018/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0be93f9..602324b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,4 +34,4 @@ stage('Deploy to k8s'){ } } } -} + From 358e38628698b91c73ec4bb558711d0063fde4b8 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 13:34:57 +0530 Subject: [PATCH 019/152] Update Jenkinsfile --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 602324b..483982c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,13 +25,13 @@ pipeline { sh 'docker push success0510/nodeapp:$BUILD_NUMBER' } } -} -stage('Deploy to k8s'){ + } + stage('Deploy to k8s'){ steps{ script{ - kubernetesDeploy (configs: 'deploymentservice.yaml',kubeconfigId: 'k8s') + kubernetesDeploy (configs: 'deploymentservice.yaml',kubeconfigId: 'k8sconfigpwd') } } } } - +} From a7bc18fcb980d7834a5944d50fb412de945ebb12 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 13:35:33 +0530 Subject: [PATCH 020/152] Update Jenkinsfile --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 483982c..4cb4d61 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,4 +34,3 @@ pipeline { } } } -} From 7e5e6ff669dbd52d5ee7810e981e58ab0bcfd8db Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 13:37:10 +0530 Subject: [PATCH 021/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4cb4d61..b3d0c97 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,7 +25,7 @@ pipeline { sh 'docker push success0510/nodeapp:$BUILD_NUMBER' } } - } + } stage('Deploy to k8s'){ steps{ script{ From 664ef427c3f5596ec57f29ad7c914ee171042529 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 13:37:53 +0530 Subject: [PATCH 022/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b3d0c97..b7f987f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,7 @@ pipeline { } } } - stage('Deploy to k8s'){ + stage('Deploy to k8s'){ steps{ script{ kubernetesDeploy (configs: 'deploymentservice.yaml',kubeconfigId: 'k8sconfigpwd') From ac087c39d806822fc0605267daba3d32aef8cd75 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 13:39:54 +0530 Subject: [PATCH 023/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b7f987f..a04e18e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,7 +25,7 @@ pipeline { sh 'docker push success0510/nodeapp:$BUILD_NUMBER' } } - } + } stage('Deploy to k8s'){ steps{ script{ From 79b39b293c2c3bd287f4cb34a41fae99d1a5824e Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:21:50 +0530 Subject: [PATCH 024/152] Update Jenkinsfile --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a04e18e..cff138f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,9 +24,9 @@ pipeline { steps{ sh 'docker push success0510/nodeapp:$BUILD_NUMBER' } - } - } - stage('Deploy to k8s'){ + } + } + stage('Deploy to k8s'){ steps{ script{ kubernetesDeploy (configs: 'deploymentservice.yaml',kubeconfigId: 'k8sconfigpwd') From b5d4fab98489c2a121aa2dd2849d26696e8823c4 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:27:43 +0530 Subject: [PATCH 025/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index cff138f..712d0af 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,7 @@ pipeline { } } } - stage('Deploy to k8s'){ + stage('Deploy to k8s'){ steps{ script{ kubernetesDeploy (configs: 'deploymentservice.yaml',kubeconfigId: 'k8sconfigpwd') From 72c3bc50b57a3481bb4b7cb975746b43cf414f1f Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:31:30 +0530 Subject: [PATCH 026/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 712d0af..ea847cd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,10 +26,10 @@ pipeline { } } } - stage('Deploy to k8s'){ + stage('k8s Deploy'){ steps{ script{ - kubernetesDeploy (configs: 'deploymentservice.yaml',kubeconfigId: 'k8sconfigpwd') + kubernetesDeploy (configs: 'deploymentservice.yaml',kubeconfigId: 'k8s') } } } From 2e7bb986ba940e7ae770a2980375822e39460af4 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:37:09 +0530 Subject: [PATCH 027/152] Update Jenkinsfile --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ea847cd..1b9636c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,9 @@ pipeline { stage('k8s Deploy'){ steps{ script{ - kubernetesDeploy (configs: 'deploymentservice.yaml',kubeconfigId: 'k8s') + withKubeConfig([credentialsId: 'k8s', serverUrl: 'https://9E2401C37C33CF9F28122CA7D450AA0B.yl4.us-west-2.eks.amazonaws.com']) { + sh ('kubectl apply -f deploymentservice.yaml') + } } } From 469d089b83993fb86675f5980c4778ec135f3901 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:38:16 +0530 Subject: [PATCH 028/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1b9636c..2b43eaa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,9 +30,9 @@ pipeline { steps{ script{ withKubeConfig([credentialsId: 'k8s', serverUrl: 'https://9E2401C37C33CF9F28122CA7D450AA0B.yl4.us-west-2.eks.amazonaws.com']) { - sh ('kubectl apply -f deploymentservice.yaml') - + sh ('kubectl apply -f deploymentservice.yaml') } } } } +} From e0a7ac2f1d3a30e9142e1416bbcc6bae2ebd1a44 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:40:49 +0530 Subject: [PATCH 029/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2b43eaa..38f92d2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,9 +23,9 @@ pipeline { stage('push image') { steps{ sh 'docker push success0510/nodeapp:$BUILD_NUMBER' + } } - } - } + } stage('k8s Deploy'){ steps{ script{ From fab6689407cafb1e699c90a6dea0b0cefb25cefd Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:43:22 +0530 Subject: [PATCH 030/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 38f92d2..6ba596d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,7 @@ pipeline { } } } - stage('k8s Deploy'){ + stage('deploy to k8s'){ steps{ script{ withKubeConfig([credentialsId: 'k8s', serverUrl: 'https://9E2401C37C33CF9F28122CA7D450AA0B.yl4.us-west-2.eks.amazonaws.com']) { From c68074e62fd89a8eee16a55ea868dbb06a943860 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:44:09 +0530 Subject: [PATCH 031/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6ba596d..7a97a18 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,7 @@ pipeline { } } } - stage('deploy to k8s'){ + stage('Deploy to k8s'){ steps{ script{ withKubeConfig([credentialsId: 'k8s', serverUrl: 'https://9E2401C37C33CF9F28122CA7D450AA0B.yl4.us-west-2.eks.amazonaws.com']) { From 85e9fb9c967e0366682f74156185f3bd9561f869 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:08:56 +0530 Subject: [PATCH 032/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7a97a18..0db68ee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,11 +28,11 @@ pipeline { } stage('Deploy to k8s'){ steps{ - script{ + withKubeConfig([credentialsId: 'k8s', serverUrl: 'https://9E2401C37C33CF9F28122CA7D450AA0B.yl4.us-west-2.eks.amazonaws.com']) { sh ('kubectl apply -f deploymentservice.yaml') } - } + } } } From d52ce220e1d5ae25e9f2c5d39048afaea686d4bc Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:11:14 +0530 Subject: [PATCH 033/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0db68ee..7a97a18 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,11 +28,11 @@ pipeline { } stage('Deploy to k8s'){ steps{ - + script{ withKubeConfig([credentialsId: 'k8s', serverUrl: 'https://9E2401C37C33CF9F28122CA7D450AA0B.yl4.us-west-2.eks.amazonaws.com']) { sh ('kubectl apply -f deploymentservice.yaml') } - + } } } } From 5e5e80da14f7037f7acd70f51d8bd152d02adb2b Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:12:19 +0530 Subject: [PATCH 034/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7a97a18..f14aa87 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,8 +25,8 @@ pipeline { sh 'docker push success0510/nodeapp:$BUILD_NUMBER' } } - } - stage('Deploy to k8s'){ + + stage('Deploy to k8s') { steps{ script{ withKubeConfig([credentialsId: 'k8s', serverUrl: 'https://9E2401C37C33CF9F28122CA7D450AA0B.yl4.us-west-2.eks.amazonaws.com']) { From bcfa3ccf103908a0fc98f81d4b500928431ef36b Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:14:47 +0530 Subject: [PATCH 035/152] Update Jenkinsfile --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index f14aa87..40347ce 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,3 +36,4 @@ pipeline { } } } +} From dd856bf907cbf59f7c4ad06fdc8526f089ea09c7 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:35:06 +0530 Subject: [PATCH 036/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 40347ce..e60fd9e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { stage('Build docker image') { steps { - sh 'docker build -t success0510/nodeapp:$BUILD_NUMBER .' + sh 'docker build -t success0510/nodeapp1:$BUILD_NUMBER .' } } stage('login to dockerhub') { @@ -22,7 +22,7 @@ pipeline { } stage('push image') { steps{ - sh 'docker push success0510/nodeapp:$BUILD_NUMBER' + sh 'docker push success0510/nodeapp1:$BUILD_NUMBER' } } From cb7914d98fa20edb65c7088f7296ab66780fb662 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:35:24 +0530 Subject: [PATCH 037/152] Update deploymentservice.yaml --- deploymentservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploymentservice.yaml b/deploymentservice.yaml index 000bb38..2c63b77 100644 --- a/deploymentservice.yaml +++ b/deploymentservice.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: nodejs-k8s - image: success0510/nodeapp:$BUILD_NUMBER' # Image that will be used to containers in the cluster + image: success0510/nodeapp1:$BUILD_NUMBER' # Image that will be used to containers in the cluster imagePullPolicy: IfNotPresent ports: - containerPort: 8080 # The port that the container is running on in the cluster From 1380993aa05d49d32a2846e00fadfc64daa17bc7 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:48:51 +0530 Subject: [PATCH 038/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e60fd9e..1acf0e5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent {label 'docker-node'} environment { - DOCKERHUB_CREDENTIALS = credentials('docker-hub') + DOCKERHUB_CREDENTIALS = credentials('docker-hub1') } stages { stage('SCM Checkout') { From 2722c3035b6b520cb65f7d7d879dfd0b0ee36846 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 16:08:30 +0530 Subject: [PATCH 039/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1acf0e5..812560c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { stage('Build docker image') { steps { - sh 'docker build -t success0510/nodeapp1:$BUILD_NUMBER .' + sh 'docker build -t success0510/nodeap:$BUILD_NUMBER .' } } stage('login to dockerhub') { @@ -22,7 +22,7 @@ pipeline { } stage('push image') { steps{ - sh 'docker push success0510/nodeapp1:$BUILD_NUMBER' + sh 'docker push success0510/nodeapp:$BUILD_NUMBER' } } From 6614e5d1e35218bd824a70a101fe9520fbfa6c3f Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 20 Oct 2022 16:09:20 +0530 Subject: [PATCH 040/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 812560c..b11cb69 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { stage('Build docker image') { steps { - sh 'docker build -t success0510/nodeap:$BUILD_NUMBER .' + sh 'docker build -t success0510/nodeapp:$BUILD_NUMBER .' } } stage('login to dockerhub') { From 0344c7d59edbe798516134d1eb538b7c7d5dc922 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Mon, 31 Oct 2022 10:44:57 +0530 Subject: [PATCH 041/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b11cb69..1631da4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent {label 'docker-node'} + agent any environment { DOCKERHUB_CREDENTIALS = credentials('docker-hub1') } From 1a6a9d651a5a2663dc632e8de9f89a85802c1e76 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Mon, 31 Oct 2022 12:18:29 +0530 Subject: [PATCH 042/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1631da4..25ea207 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent any environment { - DOCKERHUB_CREDENTIALS = credentials('docker-hub1') + DOCKERHUB_CREDENTIALS = credentials('docker') } stages { stage('SCM Checkout') { From c91bf896f975596f242a8dd88bb7897a9670a980 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 11:38:15 +0530 Subject: [PATCH 043/152] Update Jenkinsfile --- Jenkinsfile | 82 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 34 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 25ea207..9a13953 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,39 +1,53 @@ -pipeline { - agent any - environment { - DOCKERHUB_CREDENTIALS = credentials('docker') - } - stages { - stage('SCM Checkout') { - steps{ - git 'https://github.com/PottaAkhil/nodejs-demo.git' - } +podTemplate(yaml: ''' + apiVersion: v1 + kind: Pod + spec: + containers: + - name: nodejs + image: thetips4you/nodeapp:latest + command: + - sleep + args: + - 99d + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - sleep + args: + - 9999999 + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker + restartPolicy: Never + volumes: + - name: kaniko-secret + secret: + secretName: dockercred + items: + - key: .dockerconfigjson + path: config.json +''') { + node(POD_LABEL) { + stage('Get a nodejs project') { + git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'main' + container('nodejs') { + stage('Build a nodejs project') { + sh ''' + echo pwd + ''' } + } + } - stage('Build docker image') { - steps { - sh 'docker build -t success0510/nodeapp:$BUILD_NUMBER .' - } - } - stage('login to dockerhub') { - steps{ - sh 'echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin' - } - } - stage('push image') { - steps{ - sh 'docker push success0510/nodeapp:$BUILD_NUMBER' - } - } - - stage('Deploy to k8s') { - steps{ - script{ - withKubeConfig([credentialsId: 'k8s', serverUrl: 'https://9E2401C37C33CF9F28122CA7D450AA0B.yl4.us-west-2.eks.amazonaws.com']) { - sh ('kubectl apply -f deploymentservice.yaml') - } - } + stage('Build nodejs Image') { + container('kaniko') { + stage('Build a Go project') { + sh ''' + /kaniko/executor --context `pwd` --destination bibinwilson/hello-kaniko:1.0 + ''' } + } } -} + + } } From 374304a97317113a2fe5c876e27cac84f27d81af Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 12:38:52 +0530 Subject: [PATCH 044/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9a13953..fcc523f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ podTemplate(yaml: ''' ''') { node(POD_LABEL) { stage('Get a nodejs project') { - git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'main' + git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' container('nodejs') { stage('Build a nodejs project') { sh ''' From b8960bdbf037a901dcb29aa11b4a5e1c8c7e66d5 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 12:40:47 +0530 Subject: [PATCH 045/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index fcc523f..2816113 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,7 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination bibinwilson/hello-kaniko:1.0 + /kaniko/executor --context `pwd` --destination success0510/hello-kaniko:1.0 ''' } } From a02a66110ac7d4a2ce667927d3e39e82be77e933 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:21:17 +0530 Subject: [PATCH 046/152] Update Jenkinsfile --- Jenkinsfile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2816113..85237cd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,6 +9,12 @@ podTemplate(yaml: ''' - sleep args: - 99d + - name: kubectl + image:kubernetes/pause:latest + command: + - sleep + args: + - 99d - name: kaniko image: gcr.io/kaniko-project/executor:debug command: @@ -29,7 +35,7 @@ podTemplate(yaml: ''' ''') { node(POD_LABEL) { stage('Get a nodejs project') { - git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' + git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'main' container('nodejs') { stage('Build a nodejs project') { sh ''' @@ -43,11 +49,17 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination success0510/hello-kaniko:1.0 + /kaniko/executor --context `pwd` --destination bibinwilson/hello-kaniko:1.0 + stage('Deploy to k8s') { + steps{ + script{ + withKubeConfig([credentialsId: 'k8s', serverUrl: 'https://525069FDBB7B3C7A8D6D4162E0F9585C.yl4.ap-southeast-1.eks.amazonaws.com']) { + sh ('kubectl apply -f deploymentservice.yaml') ''' } } } - + } } + } } From 3de8122a8081f6332a7b1b374437716c6c1d8082 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:25:23 +0530 Subject: [PATCH 047/152] Update Jenkinsfile --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 85237cd..017601b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -62,4 +62,3 @@ podTemplate(yaml: ''' } } } -} From c5b86e6ca0557fa753d0074deeadd34462e636d0 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:25:55 +0530 Subject: [PATCH 048/152] Update Jenkinsfile --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 017601b..635156e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -61,4 +61,3 @@ podTemplate(yaml: ''' } } } - } From 3f7af40bffa0caf88552447a20621a2edfe16e7b Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:30:33 +0530 Subject: [PATCH 049/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 635156e..877c004 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ podTemplate(yaml: ''' command: - sleep args: - - 99d + - 9999999 - name: kaniko image: gcr.io/kaniko-project/executor:debug command: From be9d531c568563f277e9d37aefa2d820c581cda5 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:35:08 +0530 Subject: [PATCH 050/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 877c004..c2290ee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ podTemplate(yaml: ''' args: - 99d - name: kubectl - image:kubernetes/pause:latest + image: kubernetes/pause:latest command: - sleep args: From ae1233f8368415588ebb566965d2cb5fcf3ed57f Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:37:54 +0530 Subject: [PATCH 051/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c2290ee..e5ae4c3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ podTemplate(yaml: ''' args: - 99d - name: kubectl - image: kubernetes/pause:latest + image: kong/kubernetes-ingress-controller command: - sleep args: From e7deff29c4d7d7c5a952b362ba41b3759bc857d6 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:41:10 +0530 Subject: [PATCH 052/152] Update deploymentservice.yaml --- deploymentservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploymentservice.yaml b/deploymentservice.yaml index 2c63b77..f9a3678 100644 --- a/deploymentservice.yaml +++ b/deploymentservice.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: nodejs-k8s - image: success0510/nodeapp1:$BUILD_NUMBER' # Image that will be used to containers in the cluster + image: success0510/hello-kaniko:$BUILD_NUMBER' # Image that will be used to containers in the cluster imagePullPolicy: IfNotPresent ports: - containerPort: 8080 # The port that the container is running on in the cluster From 0f20dc615f5e7e5f0a46c6e88013719c9ab292d3 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:47:34 +0530 Subject: [PATCH 053/152] Update Jenkinsfile --- Jenkinsfile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e5ae4c3..d4095d4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,9 +8,9 @@ podTemplate(yaml: ''' command: - sleep args: - - 99d + - 999999 - name: kubectl - image: kong/kubernetes-ingress-controller + image: kubernetes/pause:latest command: - sleep args: @@ -49,15 +49,18 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination bibinwilson/hello-kaniko:1.0 - stage('Deploy to k8s') { - steps{ - script{ - withKubeConfig([credentialsId: 'k8s', serverUrl: 'https://525069FDBB7B3C7A8D6D4162E0F9585C.yl4.ap-southeast-1.eks.amazonaws.com']) { - sh ('kubectl apply -f deploymentservice.yaml') + /kaniko/executor --context `pwd` --destination bibinwilson/hello-kaniko:1.0 ''' } } } - } + stage('Deploy to k8s') { + container('kubectl') { + stage('Deploy to K8s') + sh ''' + kubectl apply -f deploymentservice.yaml + ''' + } + } } +} From b14d75fd4e01cc6463c011feb725a36f886cd4ab Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:49:39 +0530 Subject: [PATCH 054/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d4095d4..26335e3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ podTemplate(yaml: ''' args: - 999999 - name: kubectl - image: kubernetes/pause:latest + image: bitnami/kubectl command: - sleep args: From 27cf41ce1e4910fc524a17c28cffebffabe41b1f Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:56:02 +0530 Subject: [PATCH 055/152] Update Jenkinsfile --- Jenkinsfile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 26335e3..432c7a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,12 +9,12 @@ podTemplate(yaml: ''' - sleep args: - 999999 - - name: kubectl - image: bitnami/kubectl - command: - - sleep - args: - - 9999999 + // - name: kubectl + // image: bitnami/kubectl + // command: + // - sleep + // args: + // - 99999 - name: kaniko image: gcr.io/kaniko-project/executor:debug command: @@ -54,13 +54,13 @@ podTemplate(yaml: ''' } } } - stage('Deploy to k8s') { - container('kubectl') { - stage('Deploy to K8s') - sh ''' - kubectl apply -f deploymentservice.yaml - ''' - } - } + // stage('Deploy to k8s') { + // container('kubectl') { + // stage('Deploy to K8s') + // sh ''' + // kubectl apply -f deploymentservice.yaml + // ''' + // } + // } } } From e53d24e7f0c9e5af86ce9af51e905e9479e8232b Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:56:57 +0530 Subject: [PATCH 056/152] Update Jenkinsfile --- Jenkinsfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 432c7a2..b700324 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,12 +9,6 @@ podTemplate(yaml: ''' - sleep args: - 999999 - // - name: kubectl - // image: bitnami/kubectl - // command: - // - sleep - // args: - // - 99999 - name: kaniko image: gcr.io/kaniko-project/executor:debug command: From 2520b0c7f3eb8de825b1f0e0005bbe816d6573f5 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:59:46 +0530 Subject: [PATCH 057/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b700324..8a34fa6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,7 @@ podTemplate(yaml: ''' container('nodejs') { stage('Build a nodejs project') { sh ''' - echo pwd + echo pwd ''' } } @@ -43,7 +43,7 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination bibinwilson/hello-kaniko:1.0 + /kaniko/executor --context `pwd` --destination bibinwilson/hello-kaniko:1.1 ''' } } From eaa1008daa7f31a45d19129bb62043b7418de4a8 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:01:22 +0530 Subject: [PATCH 058/152] Update Jenkinsfile --- Jenkinsfile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8a34fa6..7e34f36 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,13 +48,6 @@ podTemplate(yaml: ''' } } } - // stage('Deploy to k8s') { - // container('kubectl') { - // stage('Deploy to K8s') - // sh ''' - // kubectl apply -f deploymentservice.yaml - // ''' - // } - // } + } } From 17f3d87d8c50cfc0a9fc1b8ec08ec6de240502c4 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:03:46 +0530 Subject: [PATCH 059/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7e34f36..b651992 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,7 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination bibinwilson/hello-kaniko:1.1 + /kaniko/executor --context `pwd` --destination bibinwilson/hello-kaniko:2.1 ''' } } From 66226fb8e5ebb107cb0ae2e08d6509570c884f12 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:04:53 +0530 Subject: [PATCH 060/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b651992..4fcfce2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ podTemplate(yaml: ''' ''') { node(POD_LABEL) { stage('Get a nodejs project') { - git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'main' + git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' container('nodejs') { stage('Build a nodejs project') { sh ''' From c87381151b49aa9d9e046733bb095cf8bd7f517a Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:07:55 +0530 Subject: [PATCH 061/152] Update Jenkinsfile --- Jenkinsfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4fcfce2..0278d10 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,6 +9,12 @@ podTemplate(yaml: ''' - sleep args: - 999999 + - name: kubectl + image: bitnami/kubectl + command: + - sleep + args: + - 99999 - name: kaniko image: gcr.io/kaniko-project/executor:debug command: @@ -43,11 +49,10 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination bibinwilson/hello-kaniko:2.1 + /kaniko/executor --context `pwd` --destination success0510/hello-kaniko:1.1 ''' } } } - } } From 292be19a2732fc6e53d4164627e63827e955c53d Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:10:55 +0530 Subject: [PATCH 062/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0278d10..8e2e247 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ podTemplate(yaml: ''' command: - sleep args: - - 99999 + - apply - name: kaniko image: gcr.io/kaniko-project/executor:debug command: From b3467e8bfc147e2f820f61b6d08c5776c5bbe77f Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:12:27 +0530 Subject: [PATCH 063/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8e2e247..9fb2d00 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,9 +12,9 @@ podTemplate(yaml: ''' - name: kubectl image: bitnami/kubectl command: - - sleep - args: - apply + args: + - -f - name: kaniko image: gcr.io/kaniko-project/executor:debug command: From 5d3086e3a00475340dd8fbfc6836be3d79daf5a3 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:14:19 +0530 Subject: [PATCH 064/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9fb2d00..46ab061 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,9 +12,9 @@ podTemplate(yaml: ''' - name: kubectl image: bitnami/kubectl command: - - apply + - sleep args: - - -f + - 999999 - name: kaniko image: gcr.io/kaniko-project/executor:debug command: From 540e2d4a16e68a028bba049ac1c109b0c920446a Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:18:30 +0530 Subject: [PATCH 065/152] Update Jenkinsfile --- Jenkinsfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 46ab061..ffc3227 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ podTemplate(yaml: ''' command: - sleep args: - - 999999 + - apply - name: kaniko image: gcr.io/kaniko-project/executor:debug command: @@ -54,5 +54,14 @@ podTemplate(yaml: ''' } } } + stage('Deploy to k8s') { + container('kubectl') { + stage('Deploy to K8s') { + sh ''' + echo pwd && \ + kubectl apply -f deploymentservice.yaml + ''' + } + } } } From 7009e256a59839fba5182ed3712996b41e6dc042 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:19:16 +0530 Subject: [PATCH 066/152] Update Jenkinsfile --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index ffc3227..3ad72ea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -65,3 +65,4 @@ podTemplate(yaml: ''' } } } +} From 0faefb3e02bd7bb813aa3ab27d7436c09914998e Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:20:19 +0530 Subject: [PATCH 067/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3ad72ea..e434338 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ podTemplate(yaml: ''' command: - sleep args: - - apply + - 999999 - name: kaniko image: gcr.io/kaniko-project/executor:debug command: From a50199a05cd8055e616a2cff7701484e50ed3101 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 16:23:53 +0530 Subject: [PATCH 068/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e434338..cbede6f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -49,7 +49,7 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination success0510/hello-kaniko:1.1 + /kaniko/executor --context `pwd` --destination public.ecr.aws/x2e7b0r9/nodeapplication/hello-kaniko:1.1 ''' } } From e624a9397ec6bf37c695f51eee76b431b98ef16a Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 16:45:27 +0530 Subject: [PATCH 069/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index cbede6f..397e5ff 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ podTemplate(yaml: ''' command: - sleep args: - - 999999 + - 99d - name: kaniko image: gcr.io/kaniko-project/executor:debug command: From 64c4f680dd765350f2b9c13a59ecb52e01e491ae Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 17:20:58 +0530 Subject: [PATCH 070/152] Update Jenkinsfile --- Jenkinsfile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 397e5ff..1f542f4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ podTemplate(yaml: ''' command: - sleep args: - - 99d + - apply - name: kaniko image: gcr.io/kaniko-project/executor:debug command: @@ -49,11 +49,23 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination public.ecr.aws/x2e7b0r9/nodeapplication/hello-kaniko:1.1 + /kaniko/executor --context `pwd` --destination success0510/hello-kaniko:1.1 ''' } } } + stage('deploy') { + steps { + script { + docker.withRegistry( + 'https://<957288871734>.dkr.ecr..amazonaws.com', + 'ecr.:'){ + def myImage = docker.Build( '') + myImage.push('') + } + } + } + } stage('Deploy to k8s') { container('kubectl') { stage('Deploy to K8s') { From 1f54836facd8c66d5f7e3c1f1592c80ec6cd865b Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 17:22:06 +0530 Subject: [PATCH 071/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1f542f4..0e16ccf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ podTemplate(yaml: ''' command: - sleep args: - - apply + - 9999999 - name: kaniko image: gcr.io/kaniko-project/executor:debug command: From 5a99881799ec98fc5fc302106a841f21e6745cc3 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 17:23:50 +0530 Subject: [PATCH 072/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0e16ccf..5f18502 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -49,7 +49,7 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination success0510/hello-kaniko:1.1 + /kaniko/executor --context `pwd` --destination public.ecr.aws/x2e7b0r9/nodeapplication/hello-kaniko:1.1 ''' } } From 950dc8641b1b1ad42c45e2ffc9d67a478fc51afd Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 17:46:33 +0530 Subject: [PATCH 073/152] Update Jenkinsfile --- Jenkinsfile | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5f18502..9cee498 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -49,23 +49,22 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination public.ecr.aws/x2e7b0r9/nodeapplication/hello-kaniko:1.1 + /kaniko/executor --context `pwd` --destination success0510/hello-kaniko:1.1 ''' } } } - stage('deploy') { - steps { - script { - docker.withRegistry( - 'https://<957288871734>.dkr.ecr..amazonaws.com', - 'ecr.:'){ - def myImage = docker.Build( '') - myImage.push('') - } + environment { + registry = "public.ecr.aws/x2e7b0r9/nodeapplication" + } + stage('Pushing to ECR') { + steps{ + script { + sh 'aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/x2e7b0r9' + sh 'docker push public.ecr.aws/x2e7b0r9/nodeapplication:latest' + } } } - } stage('Deploy to k8s') { container('kubectl') { stage('Deploy to K8s') { From 62ed19f2378b8fc6086f34263ed6e5b9d5777f5e Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 17:47:42 +0530 Subject: [PATCH 074/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9cee498..b427b75 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -49,7 +49,7 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination success0510/hello-kaniko:1.1 + /kaniko/executor --context `pwd` --destination public.ecr.aws/x2e7b0r9/nodeapplication/hello-kaniko:1.1 ''' } } From 6f12babe6dd9f7531a1bd84a7fe328e49cd177f4 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 17:52:58 +0530 Subject: [PATCH 075/152] Update Jenkinsfile --- Jenkinsfile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b427b75..e03c5c4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,6 +45,17 @@ podTemplate(yaml: ''' } } + environment { + registry = "public.ecr.aws/x2e7b0r9/nodeapplication" + } + stage('Pushing to ECR') { + steps{ + script { + sh 'aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/x2e7b0r9' + sh 'docker push public.ecr.aws/x2e7b0r9/nodeapplication:latest' + } + } + } stage('Build nodejs Image') { container('kaniko') { stage('Build a Go project') { @@ -54,17 +65,6 @@ podTemplate(yaml: ''' } } } - environment { - registry = "public.ecr.aws/x2e7b0r9/nodeapplication" - } - stage('Pushing to ECR') { - steps{ - script { - sh 'aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/x2e7b0r9' - sh 'docker push public.ecr.aws/x2e7b0r9/nodeapplication:latest' - } - } - } stage('Deploy to k8s') { container('kubectl') { stage('Deploy to K8s') { From e6c21beb596cf6e8d0060f52a329f36b8305b54d Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 17:55:50 +0530 Subject: [PATCH 076/152] Update Jenkinsfile --- Jenkinsfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e03c5c4..276c9ca 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,14 +48,7 @@ podTemplate(yaml: ''' environment { registry = "public.ecr.aws/x2e7b0r9/nodeapplication" } - stage('Pushing to ECR') { - steps{ - script { - sh 'aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/x2e7b0r9' - sh 'docker push public.ecr.aws/x2e7b0r9/nodeapplication:latest' - } - } - } + stage('Build nodejs Image') { container('kaniko') { stage('Build a Go project') { @@ -65,6 +58,14 @@ podTemplate(yaml: ''' } } } + stage('Pushing to ECR') { + steps{ + script { + sh 'aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/x2e7b0r9' + sh 'docker push public.ecr.aws/x2e7b0r9/nodeapplication:latest' + } + } + } stage('Deploy to k8s') { container('kubectl') { stage('Deploy to K8s') { From 26171741efab767947b112918ddccb2db4b84ca4 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 17:58:03 +0530 Subject: [PATCH 077/152] Update Jenkinsfile --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 276c9ca..da23270 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,7 +53,7 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination public.ecr.aws/x2e7b0r9/nodeapplication/hello-kaniko:1.1 + /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images/hello-kaniko:1.1 ''' } } @@ -61,8 +61,8 @@ podTemplate(yaml: ''' stage('Pushing to ECR') { steps{ script { - sh 'aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/x2e7b0r9' - sh 'docker push public.ecr.aws/x2e7b0r9/nodeapplication:latest' + sh 'aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com' + sh 'docker push 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:latest' } } } From b57a3e259fc339762d6c211bc927472b129976cc Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 18:11:38 +0530 Subject: [PATCH 078/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index da23270..634dac1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -46,7 +46,7 @@ podTemplate(yaml: ''' } environment { - registry = "public.ecr.aws/x2e7b0r9/nodeapplication" + registry = "957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images" } stage('Build nodejs Image') { From f5e118d5bb869d4ece6a253b8ff3e93e7a5566d9 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 18:16:25 +0530 Subject: [PATCH 079/152] Update Jenkinsfile --- Jenkinsfile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 634dac1..490f2a1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,19 +53,14 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' + sh 'aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com' + sh 'docker push 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:latest' /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images/hello-kaniko:1.1 ''' } } } - stage('Pushing to ECR') { - steps{ - script { - sh 'aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com' - sh 'docker push 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:latest' - } - } - } + stage('Deploy to k8s') { container('kubectl') { stage('Deploy to K8s') { From 7cfa8aa69530d2074c62a7c88d37c74fb5dc588f Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 18:29:29 +0530 Subject: [PATCH 080/152] Update Jenkinsfile --- Jenkinsfile | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 490f2a1..d8fb4ac 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,6 +33,37 @@ podTemplate(yaml: ''' - key: .dockerconfigjson path: config.json ''') { + environment { + AWS_ACCOUNT_ID="957288871734" + AWS_DEFAULT_REGION="957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images" + IMAGE_REPO_NAME="images" + IMAGE_TAG="latest" + REPOSITORY_URI = "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/${IMAGE_REPO_NAME}" + } + + stages { + + stage('Logging into AWS ECR') { + steps { + script { + sh "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" + } + + } + } + + + // Uploading Docker images into AWS ECR + stage('Pushing to ECR') { + steps{ + script { + sh "docker tag ${IMAGE_REPO_NAME}:${IMAGE_TAG} ${REPOSITORY_URI}:$IMAGE_TAG" + sh "docker push ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/${IMAGE_REPO_NAME}:${IMAGE_TAG}" + } + } + } + } + node(POD_LABEL) { stage('Get a nodejs project') { git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' @@ -45,22 +76,15 @@ podTemplate(yaml: ''' } } - environment { - registry = "957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images" - } - stage('Build nodejs Image') { container('kaniko') { stage('Build a Go project') { sh ''' - sh 'aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com' - sh 'docker push 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:latest' /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images/hello-kaniko:1.1 ''' } } } - stage('Deploy to k8s') { container('kubectl') { stage('Deploy to K8s') { From bf2c359d7db30de7ecd5d6e41eaa6ebb41325a08 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 1 Nov 2022 18:30:59 +0530 Subject: [PATCH 081/152] Update Jenkinsfile --- Jenkinsfile | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d8fb4ac..56c8a05 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,37 +33,7 @@ podTemplate(yaml: ''' - key: .dockerconfigjson path: config.json ''') { - environment { - AWS_ACCOUNT_ID="957288871734" - AWS_DEFAULT_REGION="957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images" - IMAGE_REPO_NAME="images" - IMAGE_TAG="latest" - REPOSITORY_URI = "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/${IMAGE_REPO_NAME}" - } - - stages { - - stage('Logging into AWS ECR') { - steps { - script { - sh "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" - } - - } - } - - - // Uploading Docker images into AWS ECR - stage('Pushing to ECR') { - steps{ - script { - sh "docker tag ${IMAGE_REPO_NAME}:${IMAGE_TAG} ${REPOSITORY_URI}:$IMAGE_TAG" - sh "docker push ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/${IMAGE_REPO_NAME}:${IMAGE_TAG}" - } - } - } - } - + node(POD_LABEL) { stage('Get a nodejs project') { git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' From 427c36c1b3f8412989247c53027ed7c3931cc570 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 10:32:50 +0530 Subject: [PATCH 082/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 56c8a05..a314f6f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,7 +50,7 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images/hello-kaniko:1.1 + /kaniko/executor --context `pwd` --destination public.ecr.aws/x2e7b0r9/nodeapplication/hello-kaniko:1.1 ''' } } From 0982a9454d19e1703f3f194494bf4563f512ea3a Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 10:40:50 +0530 Subject: [PATCH 083/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a314f6f..d078d42 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,7 +50,7 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination public.ecr.aws/x2e7b0r9/nodeapplication/hello-kaniko:1.1 + /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images ''' } } From 93a434a2b7f12c53f885a273514b8efacc86e6a5 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 10:44:51 +0530 Subject: [PATCH 084/152] Update deploymentservice.yaml --- deploymentservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploymentservice.yaml b/deploymentservice.yaml index f9a3678..c27302a 100644 --- a/deploymentservice.yaml +++ b/deploymentservice.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: nodejs-k8s - image: success0510/hello-kaniko:$BUILD_NUMBER' # Image that will be used to containers in the cluster + image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:$BUILD_NUMBER' # Image that will be used to containers in the cluster imagePullPolicy: IfNotPresent ports: - containerPort: 8080 # The port that the container is running on in the cluster From d2b025815d249c986cabbac09204bdcd47fc97be Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 16:43:30 +0530 Subject: [PATCH 085/152] Update deploymentservice.yaml --- deploymentservice.yaml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/deploymentservice.yaml b/deploymentservice.yaml index c27302a..4ae29c1 100644 --- a/deploymentservice.yaml +++ b/deploymentservice.yaml @@ -1,12 +1,16 @@ apiVersion: apps/v1 -kind: Deployment # Kubernetes resource kind we are creating +kind: Deployment metadata: - name: nodejs-k8s-deployment + name: nodejs-k8s-Deployment + labels: + app: nodejs-k8s spec: selector: matchLabels: - app: nodejs-k8s - replicas: 2 # Number of replicas that will be created for this deployment + app: nodejs-k8s + replicas: 3 + strategy: + type: RollingUpdate template: metadata: labels: @@ -14,23 +18,21 @@ spec: spec: containers: - name: nodejs-k8s - image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:$BUILD_NUMBER' # Image that will be used to containers in the cluster - imagePullPolicy: IfNotPresent + image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images ports: - - containerPort: 8080 # The port that the container is running on in the cluster - - ---- + - containerPort: 80 + protocol: TCP + imagePullPolicy: Always -apiVersion: v1 # Kubernetes API version -kind: Service # Kubernetes resource kind we are creating -metadata: # Metadata of the resource kind we are creating +apiVersion: v1 +kind: Service +metadata: name: nodejs-k8ssvc spec: selector: app: nodejst-k8s ports: - protocol: "TCP" - port: 8080 # The port that the service is running on in the cluster - targetPort: 8080 # The port exposed by the service - type: NodePort # type of the service. + port: 8080 + targetPort: 8080 + type: NodePort From 9b8133eeb6852239ad80f25be9f81c18d565d4e1 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 17:11:28 +0530 Subject: [PATCH 086/152] Create buildspec.yaml --- buildspec.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 buildspec.yaml diff --git a/buildspec.yaml b/buildspec.yaml new file mode 100644 index 0000000..8a87cfc --- /dev/null +++ b/buildspec.yaml @@ -0,0 +1,26 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: awsome-app-flux + labels: + app: app + annotations: + fluxcd.io/automated: "true" +spec: + replicas: 2 + selector: + matchLabels: + app: awsome-app-flux + template: + metadata: + labels: + app: awsome-app-flux + spec: + containers: + - name: awsome-app-flux + image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images + ports: + - containerPort: 80 + protocol: TCP + imagePullPolicy: Always + From 1ef13df37e094ccd8cb685b71b5e2ed0777ec018 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 17:11:52 +0530 Subject: [PATCH 087/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d078d42..db83944 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,7 +60,7 @@ podTemplate(yaml: ''' stage('Deploy to K8s') { sh ''' echo pwd && \ - kubectl apply -f deploymentservice.yaml + kubectl apply -f buildspec.yaml ''' } } From 96b6224c6e29e7c72c4febe111ac46f95ecf822d Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 17:54:33 +0530 Subject: [PATCH 088/152] Update buildspec.yaml --- buildspec.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/buildspec.yaml b/buildspec.yaml index 8a87cfc..ac1220e 100644 --- a/buildspec.yaml +++ b/buildspec.yaml @@ -20,7 +20,5 @@ spec: - name: awsome-app-flux image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images ports: - - containerPort: 80 - protocol: TCP - imagePullPolicy: Always + From b7616fe3be71527951d4484976369ee18aa24283 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 17:59:17 +0530 Subject: [PATCH 089/152] Update buildspec.yaml --- buildspec.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/buildspec.yaml b/buildspec.yaml index ac1220e..bae0bd9 100644 --- a/buildspec.yaml +++ b/buildspec.yaml @@ -19,6 +19,3 @@ spec: containers: - name: awsome-app-flux image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images - ports: - - From f78ac43576b873a408cfb5b9e9d2c4ece319837f Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 18:08:31 +0530 Subject: [PATCH 090/152] Rename buildspec.yaml to flux.yaml --- buildspec.yaml => flux.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename buildspec.yaml => flux.yaml (100%) diff --git a/buildspec.yaml b/flux.yaml similarity index 100% rename from buildspec.yaml rename to flux.yaml From 7042c6a5f5150ba51aa0aae027a891f4aaa57d74 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 18:09:05 +0530 Subject: [PATCH 091/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index db83944..1d0664e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,7 +60,7 @@ podTemplate(yaml: ''' stage('Deploy to K8s') { sh ''' echo pwd && \ - kubectl apply -f buildspec.yaml + kubectl apply -f flux.yaml ''' } } From ee1e7ca2524c5f03904b29ca27c67e374ec3232d Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 18:25:04 +0530 Subject: [PATCH 092/152] Update Jenkinsfile --- Jenkinsfile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1d0664e..0832770 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,20 +50,12 @@ podTemplate(yaml: ''' container('kaniko') { stage('Build a Go project') { sh ''' - /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images + /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:$BUILD_NUMBER && \ + /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:latest && \ ''' } } } - stage('Deploy to k8s') { - container('kubectl') { - stage('Deploy to K8s') { - sh ''' - echo pwd && \ - kubectl apply -f flux.yaml - ''' - } - } - } + } } From 1c287b498306af343a1f00bf50833d1a90fd19f8 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 18:26:21 +0530 Subject: [PATCH 093/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0832770..48dbc9d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,7 +51,7 @@ podTemplate(yaml: ''' stage('Build a Go project') { sh ''' /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:$BUILD_NUMBER && \ - /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:latest && \ + /kaniko/executor --context `pwd` --destination 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:latest ''' } } From b9d767f59d476b5c242ad670ce21fdc17e882315 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 2 Nov 2022 18:39:18 +0530 Subject: [PATCH 094/152] Update Jenkinsfile --- Jenkinsfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 48dbc9d..52e7189 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -56,6 +56,15 @@ podTemplate(yaml: ''' } } } - + stage('Deploy to k8s') { + container('kubectl') { + stage('Deploy to K8s') { + sh ''' + echo pwd && \ + kubectl apply -f flux.yaml + ''' + } + } + } } } From a748a3c1e571727ada8f7b3229d443eaba28a707 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 10:18:23 +0530 Subject: [PATCH 095/152] Update flux.yaml --- flux.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/flux.yaml b/flux.yaml index bae0bd9..251db28 100644 --- a/flux.yaml +++ b/flux.yaml @@ -19,3 +19,16 @@ spec: containers: - name: awsome-app-flux image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images + +apiVersion: v1 +kind: Service +metadata: + name: awsome-app-flux-svc +spec: + selector: + app: awsome-app-flux + ports: + - protocol: "TCP" + port: 8080 + targetPort: 8080 + type: NodePort From 5c7e1ca06d84889d74fc001defc1e95eb7f35fbc Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 10:18:45 +0530 Subject: [PATCH 096/152] Update Jenkinsfile --- Jenkinsfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 52e7189..48dbc9d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -56,15 +56,6 @@ podTemplate(yaml: ''' } } } - stage('Deploy to k8s') { - container('kubectl') { - stage('Deploy to K8s') { - sh ''' - echo pwd && \ - kubectl apply -f flux.yaml - ''' - } - } - } + } } From 2af8908d97e8f75d67cf321e8a8f0d5f991d423f Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:21:30 +0530 Subject: [PATCH 097/152] Update deployment.yml --- nodeapp/deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodeapp/deployment.yml b/nodeapp/deployment.yml index 8468bbd..85b131e 100644 --- a/nodeapp/deployment.yml +++ b/nodeapp/deployment.yml @@ -16,6 +16,6 @@ spec: spec: containers: - name: nodeserver - image: thetips4you/nodeapp:latest + image: appdynamics/nodejs-agent ports: - containerPort: 3000 From e03e5c0413408e1a513942703bdf413550e60ece Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:30:32 +0530 Subject: [PATCH 098/152] Update deployment.yml --- nodeapp/deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodeapp/deployment.yml b/nodeapp/deployment.yml index 85b131e..143b9c3 100644 --- a/nodeapp/deployment.yml +++ b/nodeapp/deployment.yml @@ -16,6 +16,6 @@ spec: spec: containers: - name: nodeserver - image: appdynamics/nodejs-agent + image: node:fermium-slim ports: - containerPort: 3000 From 22a2eb0c3d94f8be7353c71947323c0a8ecaf40d Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:38:10 +0530 Subject: [PATCH 099/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 48dbc9d..589d062 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ podTemplate(yaml: ''' spec: containers: - name: nodejs - image: thetips4you/nodeapp:latest + image: node:fermium-slim command: - sleep args: From 390ecaa32e28380e6bdfc4e2f1ea313773fdc8f8 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:42:07 +0530 Subject: [PATCH 100/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 589d062..f2584a7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ podTemplate(yaml: ''' spec: containers: - name: nodejs - image: node:fermium-slim + image: appdynamics/nodejs-agent command: - sleep args: From c2563471c22f62ba737449acc59aebf7faeefa6b Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:43:59 +0530 Subject: [PATCH 101/152] Update deployment.yml --- nodeapp/deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodeapp/deployment.yml b/nodeapp/deployment.yml index 143b9c3..85b131e 100644 --- a/nodeapp/deployment.yml +++ b/nodeapp/deployment.yml @@ -16,6 +16,6 @@ spec: spec: containers: - name: nodeserver - image: node:fermium-slim + image: appdynamics/nodejs-agent ports: - containerPort: 3000 From 4b3b1088504fde905b9c2387cce793b8479321c9 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:47:06 +0530 Subject: [PATCH 102/152] Update deployment.yml --- nodeapp/deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodeapp/deployment.yml b/nodeapp/deployment.yml index 85b131e..fb84522 100644 --- a/nodeapp/deployment.yml +++ b/nodeapp/deployment.yml @@ -16,6 +16,6 @@ spec: spec: containers: - name: nodeserver - image: appdynamics/nodejs-agent + image: thetips4you/nodeapp ports: - containerPort: 3000 From cb36aac8b2d6d0fe60440ab5d2ae5bb9a0ed7b5c Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:47:32 +0530 Subject: [PATCH 103/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f2584a7..50bf240 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ podTemplate(yaml: ''' spec: containers: - name: nodejs - image: appdynamics/nodejs-agent + image: thetips4you/nodeapp command: - sleep args: From 0d942d943cefb412b3036b27000c31c82790e311 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:53:52 +0530 Subject: [PATCH 104/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 50bf240..eb0551d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ podTemplate(yaml: ''' spec: containers: - name: nodejs - image: thetips4you/nodeapp + image: node:6-alpine command: - sleep args: From ac181033d81907efd2c9ea5ca6292d998965e334 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:54:16 +0530 Subject: [PATCH 105/152] Update deployment.yml --- nodeapp/deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodeapp/deployment.yml b/nodeapp/deployment.yml index fb84522..34cc74a 100644 --- a/nodeapp/deployment.yml +++ b/nodeapp/deployment.yml @@ -16,6 +16,6 @@ spec: spec: containers: - name: nodeserver - image: thetips4you/nodeapp + image: node:6-alpine ports: - containerPort: 3000 From 75dd5d37683f666cbc40974739810485eab53f50 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 12:57:20 +0530 Subject: [PATCH 106/152] Update deploymentservice.yaml --- deploymentservice.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploymentservice.yaml b/deploymentservice.yaml index 4ae29c1..00de8ab 100644 --- a/deploymentservice.yaml +++ b/deploymentservice.yaml @@ -4,6 +4,8 @@ metadata: name: nodejs-k8s-Deployment labels: app: nodejs-k8s + annotations: + fluxcd.io/automated: "true" spec: selector: matchLabels: From 92d1a5129a96adf5e11e9ba208645c02d29229c5 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Thu, 3 Nov 2022 12:58:11 +0530 Subject: [PATCH 107/152] Update Jenkinsfile --- Jenkinsfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index eb0551d..d8d0fb2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -56,6 +56,15 @@ podTemplate(yaml: ''' } } } - + stage('Deploy to k8s') { + container('kubectl') { + stage('Deploy to K8s') { + sh ''' + echo pwd && \ + kubectl apply -f deploymentservice.yaml + ''' + } + } + } } } From 3045ad62d994c65fec0796273d01526ef1df1a3c Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Fri, 4 Nov 2022 17:09:27 +0530 Subject: [PATCH 108/152] Update flux.yaml --- flux.yaml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/flux.yaml b/flux.yaml index 251db28..d42d400 100644 --- a/flux.yaml +++ b/flux.yaml @@ -3,11 +3,11 @@ kind: Deployment metadata: name: awsome-app-flux labels: - app: app + app: awsome-app-flux annotations: - fluxcd.io/automated: "true" + fluxcd.io/automated: "true" spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: awsome-app-flux @@ -18,17 +18,20 @@ spec: spec: containers: - name: awsome-app-flux - image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images - + image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:66 + ports: + - containerPort: 8080 + +--- + apiVersion: v1 kind: Service -metadata: +metadata: name: awsome-app-flux-svc spec: selector: app: awsome-app-flux ports: - protocol: "TCP" - port: 8080 - targetPort: 8080 - type: NodePort + port: 80 + targetPort: 3000 From f812450b9ba34cdd163a1c8c0121cfa02d22294e Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Fri, 4 Nov 2022 17:10:20 +0530 Subject: [PATCH 109/152] Create ingress.yaml --- ingress.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ingress.yaml diff --git a/ingress.yaml b/ingress.yaml new file mode 100644 index 0000000..ca42587 --- /dev/null +++ b/ingress.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: simple-ingress + annotations: + kubernetes.io/ingress.class: nginx + alb.ingress.kubernetes.io/scheme: internet-facing + alb.ingress.kubernetes.io/target-type: ip +spec: + rules: + - host: + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: awsome-app-flux-svc + port: + number: 80 From b4c5f2cf3b6557e2a75628a6e43c268b4a5a3d95 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Fri, 4 Nov 2022 17:18:05 +0530 Subject: [PATCH 110/152] Create download NLB & jenkins --- download NLB & jenkins | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 download NLB & jenkins diff --git a/download NLB & jenkins b/download NLB & jenkins new file mode 100644 index 0000000..2f61d40 --- /dev/null +++ b/download NLB & jenkins @@ -0,0 +1,2 @@ +https://kubernetes.github.io/ingress-nginx/deploy/#digital-ocean ==== to download the Ngnix Load Balancer and attach it to the node +https://devopscube.com/jenkins-build-agents-kubernetes/ -setup jekins agent on From f5814dc9c1f0c68239d18e6b69ed5c17b012f089 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:22:20 +0530 Subject: [PATCH 111/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d8d0fb2..4cf2180 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -61,7 +61,7 @@ podTemplate(yaml: ''' stage('Deploy to K8s') { sh ''' echo pwd && \ - kubectl apply -f deploymentservice.yaml + kubectl apply -f ingress.yaml ''' } } From 061cba16def8ce45f2c331415a6693f508aeb2ac Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:25:29 +0530 Subject: [PATCH 112/152] Update Jenkinsfile --- Jenkinsfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4cf2180..c777cfe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,6 +57,16 @@ podTemplate(yaml: ''' } } stage('Deploy to k8s') { + container('kubectl') { + stage('Deploy to K8s') { + sh ''' + echo pwd && \ + kubectl apply -f flux.yaml + ''' + } + } + } + stage('Deploy to k8s') { container('kubectl') { stage('Deploy to K8s') { sh ''' From 18e2f9118c3cae07a53754cca71c3d7f64772bc3 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:56:07 +0530 Subject: [PATCH 113/152] Update Jenkinsfile --- Jenkinsfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c777cfe..91f47ef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,19 +58,10 @@ podTemplate(yaml: ''' } stage('Deploy to k8s') { container('kubectl') { - stage('Deploy to K8s') { + stage('Deploy') { sh ''' echo pwd && \ kubectl apply -f flux.yaml - ''' - } - } - } - stage('Deploy to k8s') { - container('kubectl') { - stage('Deploy to K8s') { - sh ''' - echo pwd && \ kubectl apply -f ingress.yaml ''' } From 988e2257f96b0a300b9c48e0a770be30d43e8be4 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Mon, 7 Nov 2022 11:19:54 +0530 Subject: [PATCH 114/152] Update Jenkinsfile --- Jenkinsfile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 91f47ef..eb0551d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -56,16 +56,6 @@ podTemplate(yaml: ''' } } } - stage('Deploy to k8s') { - container('kubectl') { - stage('Deploy') { - sh ''' - echo pwd && \ - kubectl apply -f flux.yaml - kubectl apply -f ingress.yaml - ''' - } - } - } + } } From 60899d18703a1576aadb425f228af1925119c141 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Mon, 7 Nov 2022 11:47:13 +0530 Subject: [PATCH 115/152] Update deployment.yml --- nodeapp/deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodeapp/deployment.yml b/nodeapp/deployment.yml index 34cc74a..8468bbd 100644 --- a/nodeapp/deployment.yml +++ b/nodeapp/deployment.yml @@ -16,6 +16,6 @@ spec: spec: containers: - name: nodeserver - image: node:6-alpine + image: thetips4you/nodeapp:latest ports: - containerPort: 3000 From 910230ef7e6a2533c0fb3b31735da0d41d6e1f22 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:38:16 +0530 Subject: [PATCH 116/152] Update Jenkinsfile --- Jenkinsfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index eb0551d..4d42fd3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,6 +45,17 @@ podTemplate(yaml: ''' } } } + stage('SonarQube analysis') { + def scannerHome = tool 'sonarqube'; + withSonarQubeEnv('sonarqube') { + sh "${scannerHome}/bin/sonar-scanner \ + -D sonar.login=admin \ + -D sonar.password=admin \ + -D sonar.projectKey=64ff26562ec686e6a6d6dd1a13ecb1e056ae4f00 \ + -D sonar.exclusions=vendor/**,resources/**,**/*.java \ + -D sonar.host.url=http://52.221.196.44:9000/" + } + } stage('Build nodejs Image') { container('kaniko') { From 04ffd566a7aa5e850029ad9a2a7f5204cf9a3d67 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:44:25 +0530 Subject: [PATCH 117/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4d42fd3..6475481 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,8 +51,8 @@ podTemplate(yaml: ''' sh "${scannerHome}/bin/sonar-scanner \ -D sonar.login=admin \ -D sonar.password=admin \ - -D sonar.projectKey=64ff26562ec686e6a6d6dd1a13ecb1e056ae4f00 \ - -D sonar.exclusions=vendor/**,resources/**,**/*.java \ + -D sonar.projectKey= nodejs\ + -D sonar.exclusions=vendor/**,resources/**,**/*.node \ -D sonar.host.url=http://52.221.196.44:9000/" } } From c4f8739648c83774841eaca57c6965e9177fa22d Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:46:30 +0530 Subject: [PATCH 118/152] Update Jenkinsfile --- Jenkinsfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6475481..e38ea01 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,14 +37,6 @@ podTemplate(yaml: ''' node(POD_LABEL) { stage('Get a nodejs project') { git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' - container('nodejs') { - stage('Build a nodejs project') { - sh ''' - echo pwd - ''' - } - } - } stage('SonarQube analysis') { def scannerHome = tool 'sonarqube'; withSonarQubeEnv('sonarqube') { @@ -55,7 +47,16 @@ podTemplate(yaml: ''' -D sonar.exclusions=vendor/**,resources/**,**/*.node \ -D sonar.host.url=http://52.221.196.44:9000/" } - } + } + container('nodejs') { + stage('Build a nodejs project') { + sh ''' + echo pwd + ''' + } + } + } + stage('Build nodejs Image') { container('kaniko') { From 8bbaebcbaff0a6668b9fe97872a7984a0d75a57b Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:50:49 +0530 Subject: [PATCH 119/152] Update Jenkinsfile --- Jenkinsfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e38ea01..d5382d1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,10 +33,10 @@ podTemplate(yaml: ''' - key: .dockerconfigjson path: config.json ''') { - - node(POD_LABEL) { - stage('Get a nodejs project') { - git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' + stage('Clone the Git') { + git 'https://github.com/PottaAkhil/nodejs-demo.git' + } + stage('SonarQube analysis') { def scannerHome = tool 'sonarqube'; withSonarQubeEnv('sonarqube') { @@ -47,7 +47,11 @@ podTemplate(yaml: ''' -D sonar.exclusions=vendor/**,resources/**,**/*.node \ -D sonar.host.url=http://52.221.196.44:9000/" } - } + } + + node(POD_LABEL) { + stage('Get a nodejs project') { + git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' container('nodejs') { stage('Build a nodejs project') { sh ''' From ea90582534bc8fa412d7092de8b5aca8dc749368 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:53:15 +0530 Subject: [PATCH 120/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d5382d1..85cde0d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ podTemplate(yaml: ''' path: config.json ''') { stage('Clone the Git') { - git 'https://github.com/PottaAkhil/nodejs-demo.git' + git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' } stage('SonarQube analysis') { @@ -48,7 +48,7 @@ podTemplate(yaml: ''' -D sonar.host.url=http://52.221.196.44:9000/" } } - +} node(POD_LABEL) { stage('Get a nodejs project') { git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' From 2eb6608dee131050ca572c8d8b28ace5a3991321 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:54:08 +0530 Subject: [PATCH 121/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 85cde0d..b10817c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -74,4 +74,4 @@ podTemplate(yaml: ''' } } -} + From f488806f833a40c658193d8ad60559011df59768 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:56:53 +0530 Subject: [PATCH 122/152] Update Jenkinsfile --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b10817c..bccaba4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,8 @@ podTemplate(yaml: ''' items: - key: .dockerconfigjson path: config.json -''') { +''') + node { stage('Clone the Git') { git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' } From 78729c27e7de73670c5a20575f4d8969f05fcf80 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:58:04 +0530 Subject: [PATCH 123/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bccaba4..f5f236c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,7 @@ podTemplate(yaml: ''' - key: .dockerconfigjson path: config.json ''') - node { + node(POD_LABEL) { stage('Clone the Git') { git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' } From fd00357fbdb8ff495ecd2d5426a01b91b1c90d1d Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:58:53 +0530 Subject: [PATCH 124/152] Update Jenkinsfile --- Jenkinsfile | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f5f236c..03f8890 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,23 +33,6 @@ podTemplate(yaml: ''' - key: .dockerconfigjson path: config.json ''') - node(POD_LABEL) { - stage('Clone the Git') { - git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' - } - - stage('SonarQube analysis') { - def scannerHome = tool 'sonarqube'; - withSonarQubeEnv('sonarqube') { - sh "${scannerHome}/bin/sonar-scanner \ - -D sonar.login=admin \ - -D sonar.password=admin \ - -D sonar.projectKey= nodejs\ - -D sonar.exclusions=vendor/**,resources/**,**/*.node \ - -D sonar.host.url=http://52.221.196.44:9000/" - } - } -} node(POD_LABEL) { stage('Get a nodejs project') { git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' From 4ae52f946493a253315913b089776a48a3756866 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:01:46 +0530 Subject: [PATCH 125/152] Update Jenkinsfile --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 03f8890..85f5fd1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,8 @@ podTemplate(yaml: ''' items: - key: .dockerconfigjson path: config.json -''') +''') { + node(POD_LABEL) { stage('Get a nodejs project') { git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' From ef25a31c44616c8b1c92e2e34aa1ee3de3816e92 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:02:37 +0530 Subject: [PATCH 126/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 85f5fd1..04c82ff 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -59,4 +59,4 @@ podTemplate(yaml: ''' } } - +} From ac864cff5bff69ff95ac73ec940ef06527a43df3 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:11:34 +0530 Subject: [PATCH 127/152] Update flux.yaml --- flux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flux.yaml b/flux.yaml index d42d400..2daede2 100644 --- a/flux.yaml +++ b/flux.yaml @@ -18,7 +18,7 @@ spec: spec: containers: - name: awsome-app-flux - image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:66 + image: 957288871734.dkr.ecr.ap-southeast-1.amazonaws.com/images:latest ports: - containerPort: 8080 From b004f2318cc9bb88e6fbcbac41f946e5d68637d8 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:12:22 +0530 Subject: [PATCH 128/152] Update Jenkinsfile --- Jenkinsfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 04c82ff..0901862 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,6 +57,17 @@ podTemplate(yaml: ''' } } } - + stage('Deploy to k8s') { + container('kubectl') { + stage('Deploy to K8s') { + sh ''' + echo pwd && \ + kubectl apply -f flux.yaml &&\ + kubectl apply -f ingress.yaml + + ''' + } + } + } } } From 7c2d260db71f10c9da6ae7d73ba423e69cd6d44c Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:25:55 +0530 Subject: [PATCH 129/152] Update Jenkinsfile --- Jenkinsfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0901862..b05dde9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -61,9 +61,8 @@ podTemplate(yaml: ''' container('kubectl') { stage('Deploy to K8s') { sh ''' - echo pwd && \ - kubectl apply -f flux.yaml &&\ - kubectl apply -f ingress.yaml + /kubectl apply -f flux.yaml &&\ + / kubectl apply -f ingress.yaml ''' } From 1b5433d46e9c71e1f4d2fd1ba7e613bb8bfde92c Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:29:08 +0530 Subject: [PATCH 130/152] Update deploymentservice.yaml --- deploymentservice.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/deploymentservice.yaml b/deploymentservice.yaml index 00de8ab..2e27c7e 100644 --- a/deploymentservice.yaml +++ b/deploymentservice.yaml @@ -33,6 +33,7 @@ metadata: spec: selector: app: nodejst-k8s + type: LoadBalancer ports: - protocol: "TCP" port: 8080 From a490f7c1d3e8437b4309de97610f29cf2946773f Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:29:55 +0530 Subject: [PATCH 131/152] Update Jenkinsfile --- Jenkinsfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b05dde9..da46797 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -61,9 +61,8 @@ podTemplate(yaml: ''' container('kubectl') { stage('Deploy to K8s') { sh ''' - /kubectl apply -f flux.yaml &&\ - / kubectl apply -f ingress.yaml - + echo pwd && \ + kubectl apply -f deploymentservice.yaml ''' } } From 195eef06ea5e07542e35983fa21b2615fae5131a Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 14:14:55 +0530 Subject: [PATCH 132/152] Update Jenkinsfile --- Jenkinsfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index da46797..04c82ff 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,15 +57,6 @@ podTemplate(yaml: ''' } } } - stage('Deploy to k8s') { - container('kubectl') { - stage('Deploy to K8s') { - sh ''' - echo pwd && \ - kubectl apply -f deploymentservice.yaml - ''' - } - } - } + } } From 52f4621ae3344d0a160327897a23c3f16c176b8e Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 14:44:56 +0530 Subject: [PATCH 133/152] Update Jenkinsfile --- Jenkinsfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 04c82ff..279f05b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,6 +57,16 @@ podTemplate(yaml: ''' } } } - + tage('Deploy to k8s') { + container('kubectl') { + stage('Deploy to K8s') { + sh ''' + + /kaniko/executor --context kubectl apply -f flux.yaml &&\ + /kaniko/executor --context kubectl apply -f ingress.yaml + ''' + } + } + } } } From 0c5a5ecbf68d8999895cbb243fb8cea1cf8fd450 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 14:47:41 +0530 Subject: [PATCH 134/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 279f05b..4fe9eb5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,7 +57,7 @@ podTemplate(yaml: ''' } } } - tage('Deploy to k8s') { + stage('Deploy to k8s') { container('kubectl') { stage('Deploy to K8s') { sh ''' From 877baaf377e57350d81bd3b474d6c4ba954e12ee Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:39:08 +0530 Subject: [PATCH 135/152] Update Jenkinsfile --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4fe9eb5..aa72951 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -59,11 +59,11 @@ podTemplate(yaml: ''' } stage('Deploy to k8s') { container('kubectl') { - stage('Deploy to K8s') { - sh ''' - - /kaniko/executor --context kubectl apply -f flux.yaml &&\ - /kaniko/executor --context kubectl apply -f ingress.yaml + + stage("deploy the docker image into deployment server"){ + sshagent(['ubuntu']) { + sh "ssh kubectl apply -f flux.yaml + sh "ssh kubectl apply -f ingress.yaml" ''' } } From 3916108784b4bc33653168542f59565cfa6cea5c Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:39:58 +0530 Subject: [PATCH 136/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index aa72951..d78104b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -63,7 +63,7 @@ podTemplate(yaml: ''' stage("deploy the docker image into deployment server"){ sshagent(['ubuntu']) { sh "ssh kubectl apply -f flux.yaml - sh "ssh kubectl apply -f ingress.yaml" + sh "ssh kubectl apply -f ingress.yaml" ''' } } From 10b0f74515c41961bc8a8a932c66e844e9078438 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:40:52 +0530 Subject: [PATCH 137/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d78104b..6af2200 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,7 @@ podTemplate(yaml: ''' node(POD_LABEL) { stage('Get a nodejs project') { - git url: 'https://github.com/PottaAkhil/nodejs-demo.git', branch: 'master' + git url: 'https://github.com/PottaAkhil/nodejs-OBT.git', branch: 'master' container('nodejs') { stage('Build a nodejs project') { sh ''' From 6b599978403127910920b27efe3c7afbe6311b4e Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:41:25 +0530 Subject: [PATCH 138/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6af2200..1faf43b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -62,7 +62,7 @@ podTemplate(yaml: ''' stage("deploy the docker image into deployment server"){ sshagent(['ubuntu']) { - sh "ssh kubectl apply -f flux.yaml + sh "ssh kubectl apply -f flux.yaml" sh "ssh kubectl apply -f ingress.yaml" ''' } From d5eda3080435180cf76d310fb299e342253ddd83 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:42:15 +0530 Subject: [PATCH 139/152] Update Jenkinsfile --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 1faf43b..703bef5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -70,3 +70,4 @@ podTemplate(yaml: ''' } } } +} From 5f1239d99619c12ca6ed15665710ceb7286f00ec Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:43:57 +0530 Subject: [PATCH 140/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 703bef5..c3be378 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -62,8 +62,8 @@ podTemplate(yaml: ''' stage("deploy the docker image into deployment server"){ sshagent(['ubuntu']) { - sh "ssh kubectl apply -f flux.yaml" - sh "ssh kubectl apply -f ingress.yaml" + sh 'ssh kubectl apply -f flux.yaml' + sh 'ssh kubectl apply -f ingress.yaml' ''' } } From 5e52842d3eeac88a2e519bf5f2a1551e1b9ee0c0 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:46:38 +0530 Subject: [PATCH 141/152] Update Jenkinsfile --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index c3be378..9286c88 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,3 +71,4 @@ podTemplate(yaml: ''' } } } +} From 2932eb184ff9cfc002809565e8eea7e4e5b11116 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:48:36 +0530 Subject: [PATCH 142/152] Update Jenkinsfile --- Jenkinsfile | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9286c88..60f1e8a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,18 +57,6 @@ podTemplate(yaml: ''' } } } - stage('Deploy to k8s') { - container('kubectl') { - - stage("deploy the docker image into deployment server"){ - sshagent(['ubuntu']) { - sh 'ssh kubectl apply -f flux.yaml' - sh 'ssh kubectl apply -f ingress.yaml' - ''' - } - } - } -} -} + } } From 3215a781732ea918b2395c53f82b55ccdab0fac9 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:57:57 +0530 Subject: [PATCH 143/152] Update Jenkinsfile --- Jenkinsfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 60f1e8a..824cc82 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,6 +57,14 @@ podTemplate(yaml: ''' } } } - + stage('Deploy to k8s') { + container('kubectl') { + sshagent(['ubuntu']) { + sh "ssh -o StrictHostKeyChecking=no ubuntu@52.221.196.44 kubectl apply -f flux.yaml" + sh "ssh -o StrictHostKeyChecking=no ubuntu@52.221.196.44 kubectl apply -f ingress.yaml" + + } + } + } } } From 209b3743cf47b7efc37631ba34c3cb3bfd78f9d2 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:04:24 +0530 Subject: [PATCH 144/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 824cc82..088c722 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -59,7 +59,7 @@ podTemplate(yaml: ''' } stage('Deploy to k8s') { container('kubectl') { - sshagent(['ubuntu']) { + sshagent(['docker']) { sh "ssh -o StrictHostKeyChecking=no ubuntu@52.221.196.44 kubectl apply -f flux.yaml" sh "ssh -o StrictHostKeyChecking=no ubuntu@52.221.196.44 kubectl apply -f ingress.yaml" From f8ea60d1f672e6ad744afa2356b7e79dd8624f3e Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:06:01 +0530 Subject: [PATCH 145/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 088c722..ad5de44 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,8 +60,8 @@ podTemplate(yaml: ''' stage('Deploy to k8s') { container('kubectl') { sshagent(['docker']) { - sh "ssh -o StrictHostKeyChecking=no ubuntu@52.221.196.44 kubectl apply -f flux.yaml" - sh "ssh -o StrictHostKeyChecking=no ubuntu@52.221.196.44 kubectl apply -f ingress.yaml" + sh "ssh -o StrictHostKeyChecking=no root@52.221.196.44 kubectl apply -f flux.yaml" + sh "ssh -o StrictHostKeyChecking=no root@52.221.196.44 kubectl apply -f ingress.yaml" } } From 1dc656a8f1a38c451f8d5f5bf86bbfe4a4ff71ce Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:32:11 +0530 Subject: [PATCH 146/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ad5de44..75679c9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -59,7 +59,7 @@ podTemplate(yaml: ''' } stage('Deploy to k8s') { container('kubectl') { - sshagent(['docker']) { + sshagent(['52.221.196.44']) { sh "ssh -o StrictHostKeyChecking=no root@52.221.196.44 kubectl apply -f flux.yaml" sh "ssh -o StrictHostKeyChecking=no root@52.221.196.44 kubectl apply -f ingress.yaml" From 5cff9a2f3c6eac8b9903ba2436e74f9cfa34da66 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:50:11 +0530 Subject: [PATCH 147/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 75679c9..50dca9c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,7 +58,7 @@ podTemplate(yaml: ''' } } stage('Deploy to k8s') { - container('kubectl') { + sshagent(['52.221.196.44']) { sh "ssh -o StrictHostKeyChecking=no root@52.221.196.44 kubectl apply -f flux.yaml" sh "ssh -o StrictHostKeyChecking=no root@52.221.196.44 kubectl apply -f ingress.yaml" From eb569fc195971ff218de7dcb443d61390fbab87c Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:51:09 +0530 Subject: [PATCH 148/152] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 50dca9c..2367635 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -65,6 +65,6 @@ podTemplate(yaml: ''' } } - } + } } From ce4302abe680ba5cd4d7013835423d573a9fb649 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:53:34 +0530 Subject: [PATCH 149/152] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2367635..c87954c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,8 +60,8 @@ podTemplate(yaml: ''' stage('Deploy to k8s') { sshagent(['52.221.196.44']) { - sh "ssh -o StrictHostKeyChecking=no root@52.221.196.44 kubectl apply -f flux.yaml" - sh "ssh -o StrictHostKeyChecking=no root@52.221.196.44 kubectl apply -f ingress.yaml" + sh "ssh -o StrictHostKeyChecking=no ubuntu@52.221.196.44 kubectl apply -f flux.yaml" + sh "ssh -o StrictHostKeyChecking=no ubuntu@52.221.196.44 kubectl apply -f ingress.yaml" } } From c5326280e2b93d51852bae9eaab10aec158acc28 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Tue, 8 Nov 2022 17:53:35 +0530 Subject: [PATCH 150/152] Update Jenkinsfile --- Jenkinsfile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c87954c..14573da 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,14 +57,7 @@ podTemplate(yaml: ''' } } } - stage('Deploy to k8s') { - - sshagent(['52.221.196.44']) { - sh "ssh -o StrictHostKeyChecking=no ubuntu@52.221.196.44 kubectl apply -f flux.yaml" - sh "ssh -o StrictHostKeyChecking=no ubuntu@52.221.196.44 kubectl apply -f ingress.yaml" - - } - } + } } From d672afa7223c89883830809a1a9030bfe49c214a Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 9 Nov 2022 10:43:11 +0530 Subject: [PATCH 151/152] Update index.js --- nodeapp/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodeapp/index.js b/nodeapp/index.js index 8b51bcb..cb8df4b 100644 --- a/nodeapp/index.js +++ b/nodeapp/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Hello, Welcome to Valaxy" }'); + res.send('{ "response": "Hello, Welcome to Minfy" }'); }); app.get('/will', function (req, res) { From 3efaabcbcec6770ac8322437659bd59d2c20d866 Mon Sep 17 00:00:00 2001 From: PottaAkhil <96290098+PottaAkhil@users.noreply.github.com> Date: Wed, 9 Nov 2022 12:24:00 +0530 Subject: [PATCH 152/152] Update Jenkinsfile --- Jenkinsfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 14573da..04cebd2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,7 +45,17 @@ podTemplate(yaml: ''' } } } - + stage('SonarQube analysis') { + def scannerHome = tool 'sonarqube'; + withSonarQubeEnv('sonarqube') { + sh "${scannerHome}/bin/sonar-scanner \ + -D sonar.login=admin \ + -D sonar.password=admin \ + -D sonar.projectKey= nodejs \ + -D sonar.exclusions=vendor/**,resources/**,**/*.js \ + -D sonar.host.url=http://54.169.237.40:9000/" + } + } stage('Build nodejs Image') { container('kaniko') {