From b90c62a5ca1ff5e47accc0f1fbb2ae63c241d2a8 Mon Sep 17 00:00:00 2001 From: Tienlong Pham Date: Tue, 8 Feb 2022 13:52:28 -0600 Subject: [PATCH 01/10] Build container --- Jenkinsfile | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e3e8fb3b..f02ee4db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,5 +8,31 @@ pipeline { archiveArtifacts artifacts: 'dist/trainSchedule.zip' } } - } -} \ No newline at end of file + stage('Build Docker Image') { + when { + branch 'master' + } + steps { + script { + app = docker.build("aglorei/train-schedule") + app.inside { + sh 'echo $(curl localhost:8080)' + } + } + } + } + stage('Push Docker Image') { + when { + branch 'master' + } + steps { + script { + docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') { + app.push("${env.BUILD_NUMBER}") + app.push("latest") + } + } + } + } + } +} From 84906ce4370ed21e873d4a281cd1d0bfd2bb225d Mon Sep 17 00:00:00 2001 From: Tienlong Pham Date: Tue, 8 Feb 2022 14:04:29 -0600 Subject: [PATCH 02/10] Revert "Build container" This reverts commit b90c62a5ca1ff5e47accc0f1fbb2ae63c241d2a8. --- Jenkinsfile | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f02ee4db..e3e8fb3b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,31 +8,5 @@ pipeline { archiveArtifacts artifacts: 'dist/trainSchedule.zip' } } - stage('Build Docker Image') { - when { - branch 'master' - } - steps { - script { - app = docker.build("aglorei/train-schedule") - app.inside { - sh 'echo $(curl localhost:8080)' - } - } - } - } - stage('Push Docker Image') { - when { - branch 'master' - } - steps { - script { - docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') { - app.push("${env.BUILD_NUMBER}") - app.push("latest") - } - } - } - } - } -} + } +} \ No newline at end of file From c6c2bdd3c6cb57eb0e184f4b4254ae18683584be Mon Sep 17 00:00:00 2001 From: Tienlong Pham Date: Tue, 8 Feb 2022 14:21:12 -0600 Subject: [PATCH 03/10] Update Readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index df6b45b1..8548f523 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,4 @@ You can run the app with: ./gradlew npm_start Once it is running, you can access it in a browser at http://localhost:8080 +FOOBAR From 91b83e27b3838d550ffc680ae2f1a1bc953ccc2d Mon Sep 17 00:00:00 2001 From: Tienlong Pham Date: Tue, 8 Feb 2022 14:23:21 -0600 Subject: [PATCH 04/10] Init correct Jenkinsfile --- Jenkinsfile | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e3e8fb3b..c8121b8c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,5 +8,31 @@ pipeline { archiveArtifacts artifacts: 'dist/trainSchedule.zip' } } + stage('Build Docker Image') { + when { + branch 'master' + } + steps { + script { + app = docker.build("aglorei/train-schedule") + app.inside { + sh 'echo $(curl localhost:8080)' + } + } + } + } + stage('Push Docker Image') { + when { + branch 'master' + } + steps { + script { + docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') { + app.push("${env.BUILD_NUMBER}") + app.push("latest") + } + } + } + } } -} \ No newline at end of file +} From b8ed872e634a8ba7cb6371287b2ab10bdace1983 Mon Sep 17 00:00:00 2001 From: Tienlong Pham Date: Tue, 8 Feb 2022 14:29:58 -0600 Subject: [PATCH 05/10] Trying to add new features --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f375d141..52190488 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,4 @@ COPY package*.json ./ RUN npm install COPY . . EXPOSE 8080 -CMD [ "npm", "start" ] \ No newline at end of file +CMD [ "npm", "start" ]asdfsadf From 9a39f63c8a2a590840a4142414e3dc3f9e66d1d6 Mon Sep 17 00:00:00 2001 From: Tienlong Pham Date: Tue, 8 Feb 2022 14:30:52 -0600 Subject: [PATCH 06/10] Move garbage to last line --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 52190488..ff873ff0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,5 @@ COPY package*.json ./ RUN npm install COPY . . EXPOSE 8080 -CMD [ "npm", "start" ]asdfsadf +CMD [ "npm", "start" ] +asdfasdfasdf From 787f9487bc4f1843777c4f5090d206a125eef99c Mon Sep 17 00:00:00 2001 From: Tienlong Pham Date: Tue, 8 Feb 2022 14:31:22 -0600 Subject: [PATCH 07/10] Use npm ci instead of npm install --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ff873ff0..2d1b2f8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:carbon WORKDIR /usr/src/app COPY package*.json ./ -RUN npm install +RUN npm ci COPY . . EXPOSE 8080 CMD [ "npm", "start" ] From e3e08bb872532b0cec0f32a6bf35b3641b0a8aaa Mon Sep 17 00:00:00 2001 From: Tienlong Pham Date: Tue, 8 Feb 2022 14:31:49 -0600 Subject: [PATCH 08/10] Remove master guard on build --- Jenkinsfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c8121b8c..ffbe70cf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,9 +9,6 @@ pipeline { } } stage('Build Docker Image') { - when { - branch 'master' - } steps { script { app = docker.build("aglorei/train-schedule") From 065342b2e308a846a9464af3cb7b3e19f9aac0b0 Mon Sep 17 00:00:00 2001 From: Tienlong Pham Date: Tue, 8 Feb 2022 14:33:23 -0600 Subject: [PATCH 09/10] Remove garbage --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2d1b2f8a..b006bd5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,3 @@ RUN npm ci COPY . . EXPOSE 8080 CMD [ "npm", "start" ] -asdfasdfasdf From e3594073a9048f8e1618baa452441ec248bdb07c Mon Sep 17 00:00:00 2001 From: Tienlong Pham Date: Tue, 8 Feb 2022 14:38:50 -0600 Subject: [PATCH 10/10] Remove garbage line from README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 8548f523..df6b45b1 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,3 @@ You can run the app with: ./gradlew npm_start Once it is running, you can access it in a browser at http://localhost:8080 -FOOBAR