From dcbc836d40f5b05a2f1525594171ce8d588231ad Mon Sep 17 00:00:00 2001 From: apsar-cloud <70571913+apsar-cloud@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:46:59 +0530 Subject: [PATCH 01/13] Create Test.md --- Test.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Test.md diff --git a/Test.md b/Test.md new file mode 100644 index 000000000..90b57d910 --- /dev/null +++ b/Test.md @@ -0,0 +1 @@ +Test pipeline From e312dd5082bf71a6a87a69e89a7b1cbb8181d9b9 Mon Sep 17 00:00:00 2001 From: apsar-cloud <70571913+apsar-cloud@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:52:32 +0530 Subject: [PATCH 02/13] Update Test.md --- Test.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Test.md b/Test.md index 90b57d910..70a06a086 100644 --- a/Test.md +++ b/Test.md @@ -1 +1,2 @@ Test pipeline +test2 From 1d75c5a95ce5d6cb123ff3fb427f292cc25f2867 Mon Sep 17 00:00:00 2001 From: Apsar Date: Sun, 13 Sep 2020 10:31:20 +0000 Subject: [PATCH 03/13] -a --- Jenkinsfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..efd464d06 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + + agent any + + tools{ + NodesJS 'NodesJS 4.8.6' + } + + stages{ + + stage('build'){ + steps{ + sh 'npm install' + } + } + + stage('test'){ + steps{ + sh 'npm install' + sh 'npm test' + } + } + + stage('package'){ + steps{ + sh 'npm install' + sh 'npm run package' + } + } + } +} From 18269fe55744cf532be262094f8b3fceccb7c9f7 Mon Sep 17 00:00:00 2001 From: apsar-cloud <70571913+apsar-cloud@users.noreply.github.com> Date: Sun, 13 Sep 2020 16:09:03 +0530 Subject: [PATCH 04/13] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index efd464d06..12e91fa3c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,7 @@ pipeline { agent any tools{ - NodesJS 'NodesJS 4.8.6' + nodejs 'NodesJS 4.8.6' } stages{ From a368ad59638f6e12a13aa999121f3aa6ae16b035 Mon Sep 17 00:00:00 2001 From: apsar-cloud <70571913+apsar-cloud@users.noreply.github.com> Date: Sun, 13 Sep 2020 19:25:03 +0530 Subject: [PATCH 05/13] Added Jenkinsfile --- Jenkinsfile | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 12e91fa3c..f7626f5a6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,31 +1,29 @@ pipeline { - - agent any - - tools{ - nodejs 'NodesJS 4.8.6' - } - - stages{ - - stage('build'){ - steps{ + agent any + stages { + stage('build') { + steps { sh 'npm install' } } - stage('test'){ - steps{ + stage('test') { + steps { sh 'npm install' sh 'npm test' } - } + } - stage('package'){ - steps{ + stage('package') { + steps { sh 'npm install' sh 'npm run package' + archiveArtifacts '**/distribution/*.zip' } } - } -} + + } + tools { + nodejs 'NodesJS 4.8.6' + } +} \ No newline at end of file From 0421e74eeba3a36c4127f2d577009a20509dfd87 Mon Sep 17 00:00:00 2001 From: Apsar Date: Sat, 26 Sep 2020 21:54:29 +0000 Subject: [PATCH 06/13] ubuntu upgrade to 18/04 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f4852e76..ce5040d56 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Front-end application written in [Node.js](https://nodejs.org/en/) that puts tog # Setting up Dev Env -Platform : Ubuntu 16.04 +Platform : Ubuntu 18.04 ### Common Setup From 3ab7f7d4a6bf5ee6942641d656517fa0b946ad32 Mon Sep 17 00:00:00 2001 From: Apsar Date: Thu, 8 Oct 2020 06:54:46 +0000 Subject: [PATCH 07/13] Dockerfile --- Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..6a868b1e6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:4-alpine + + +WORKDIR /opt/frontend + +COPY . . + +RUN npm install + +EXPOSE 8079 + +CMD npm start From f78071e163215ad31ae26edf3b951b3ed0ea96e5 Mon Sep 17 00:00:00 2001 From: Apsar Date: Thu, 8 Oct 2020 07:30:53 +0000 Subject: [PATCH 08/13] Docker-compose file --- docker-compose.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..15c2bb855 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3.6" + +services: + frontend: + build: . + image: cloudapsar/frontend + ports: + - 8079 From 401e873b5146ec6326f8cb351cb5833b94c9c8d1 Mon Sep 17 00:00:00 2001 From: apsar-cloud <70571913+apsar-cloud@users.noreply.github.com> Date: Mon, 12 Oct 2020 15:41:21 +0530 Subject: [PATCH 09/13] Added Jenkinsfile --- Jenkinsfile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f7626f5a6..fa4cee1c8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,13 +1,25 @@ pipeline { - agent any + agent none stages { stage('build') { + agent { + docker { + image 'node:4-alpine' + } + + } steps { sh 'npm install' } } stage('test') { + agent { + docker { + image 'node:4-alpine' + } + + } steps { sh 'npm install' sh 'npm test' @@ -15,6 +27,12 @@ pipeline { } stage('package') { + agent { + node { + label 'node:4-alpine' + } + + } steps { sh 'npm install' sh 'npm run package' From ed1b92758c35fb853b79cd27afa91ce409603a6d Mon Sep 17 00:00:00 2001 From: apsar-cloud <70571913+apsar-cloud@users.noreply.github.com> Date: Mon, 12 Oct 2020 15:54:22 +0530 Subject: [PATCH 10/13] Added Jenkinsfile --- Jenkinsfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index fa4cee1c8..1310cbb92 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,6 +40,19 @@ pipeline { } } + stage('docker build') { + steps { + script { + docker.withRegistry('https://index.docker.io/v1/', 'dockerlogin') { + def dockerImage = docker.build("cloudapsar/frontend:v${env.BUILD_ID}", "./") + dockerImage.push() + dockerImage.push("latest") + } + } + + } + } + } tools { nodejs 'NodesJS 4.8.6' From f21fce13d2bfc68825ea5824509ef57b9c48d8c3 Mon Sep 17 00:00:00 2001 From: apsar-cloud <70571913+apsar-cloud@users.noreply.github.com> Date: Mon, 12 Oct 2020 16:14:00 +0530 Subject: [PATCH 11/13] Added Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1310cbb92..8b0c6e287 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,8 +28,8 @@ pipeline { stage('package') { agent { - node { - label 'node:4-alpine' + docker { + image 'node:4-alpine' } } From 94075bc7dd0074b232d3eda8725a61be2b8b6340 Mon Sep 17 00:00:00 2001 From: apsar-cloud <70571913+apsar-cloud@users.noreply.github.com> Date: Mon, 12 Oct 2020 16:19:23 +0530 Subject: [PATCH 12/13] build 2 From dbadfa1c7806510abb9af73e612461cc213bd69f Mon Sep 17 00:00:00 2001 From: apsar-cloud <70571913+apsar-cloud@users.noreply.github.com> Date: Mon, 12 Oct 2020 17:10:58 +0530 Subject: [PATCH 13/13] Added Jenkinsfile --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8b0c6e287..ded5c5a36 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ pipeline { stage('build') { agent { docker { - image 'node:4-alpine' + image 'cloudapsar/frontend:v3' } } @@ -16,7 +16,7 @@ pipeline { stage('test') { agent { docker { - image 'node:4-alpine' + image 'cloudapsar/frontend:v3' } } @@ -29,7 +29,7 @@ pipeline { stage('package') { agent { docker { - image 'node:4-alpine' + image 'cloudapsar/frontend:v3' } }