From 95b315f78bd5447880381407d5884b37743b580b Mon Sep 17 00:00:00 2001 From: iris_cx Date: Fri, 16 Jun 2023 02:08:32 +0000 Subject: [PATCH 01/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'jenkinsfilenew=5Fap?= =?UTF-8?q?i'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_api | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jenkinsfilenew_api b/jenkinsfilenew_api index 1b23ca1..d484e74 100644 --- a/jenkinsfilenew_api +++ b/jenkinsfilenew_api @@ -3,9 +3,10 @@ podTemplate { env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${IOT}/${JOB_NAME}" env.IMAGE_NAME_SHORT = "${IOT}/${JOB_NAME}" + env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/OperationalService/src/branch/dev/web" stage('Run shell') { - git credentialsId: 'gitea-builder', url: 'https://gitea.anxinyun.cn/free-sun/OperationalService.git' + git branch: 'dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" container('image-builder') { sh''' From 311f1e5b312bb60089b5e1dfbe3fa252f607c2e7 Mon Sep 17 00:00:00 2001 From: iris_cx Date: Fri, 16 Jun 2023 02:19:21 +0000 Subject: [PATCH 02/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'jenkinsfilenew=5Fap?= =?UTF-8?q?i'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfilenew_api b/jenkinsfilenew_api index d484e74..542ab8e 100644 --- a/jenkinsfilenew_api +++ b/jenkinsfilenew_api @@ -3,7 +3,7 @@ podTemplate { env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${IOT}/${JOB_NAME}" env.IMAGE_NAME_SHORT = "${IOT}/${JOB_NAME}" - env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/OperationalService/src/branch/dev/web" + env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/OperationalService.git" stage('Run shell') { git branch: 'dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" From 55dec663932deb09ac7ac83c1af2775d44c01912 Mon Sep 17 00:00:00 2001 From: iris_cx Date: Fri, 16 Jun 2023 02:25:58 +0000 Subject: [PATCH 03/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'jenkinsfilenew=5Fap?= =?UTF-8?q?i'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfilenew_api b/jenkinsfilenew_api index 542ab8e..d73a0c5 100644 --- a/jenkinsfilenew_api +++ b/jenkinsfilenew_api @@ -6,7 +6,7 @@ podTemplate { env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/OperationalService.git" stage('Run shell') { - git branch: 'dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" + git branch: 'dev', credentialsId: 'gitea-builder', url: 'https://gitea.anxinyun.cn/free-sun/OperationalService.git' container('image-builder') { sh''' From 0ebe7e1eb02caf8bb6e9d6e644805e64cfa516c0 Mon Sep 17 00:00:00 2001 From: iris_cx Date: Fri, 16 Jun 2023 02:35:29 +0000 Subject: [PATCH 04/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'jenkinsfilenew=5Fap?= =?UTF-8?q?i'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfilenew_api b/jenkinsfilenew_api index d73a0c5..f70b609 100644 --- a/jenkinsfilenew_api +++ b/jenkinsfilenew_api @@ -6,7 +6,7 @@ podTemplate { env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/OperationalService.git" stage('Run shell') { - git branch: 'dev', credentialsId: 'gitea-builder', url: 'https://gitea.anxinyun.cn/free-sun/OperationalService.git' + git branch: 'dev', credentialsId: 'gitea-builder', url: '${CODE_ADDR}' container('image-builder') { sh''' From e8ee70b39dcefb661004742ccb48a5feea06eeb6 Mon Sep 17 00:00:00 2001 From: iris_cx Date: Fri, 16 Jun 2023 02:37:57 +0000 Subject: [PATCH 05/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'jenkinsfilenew=5Fap?= =?UTF-8?q?i'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfilenew_api b/jenkinsfilenew_api index f70b609..cd5ad21 100644 --- a/jenkinsfilenew_api +++ b/jenkinsfilenew_api @@ -6,7 +6,7 @@ podTemplate { env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/OperationalService.git" stage('Run shell') { - git branch: 'dev', credentialsId: 'gitea-builder', url: '${CODE_ADDR}' + git branch: '*/dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" container('image-builder') { sh''' From 9b9deda822a12fc37eb52871819f8cee78acf5aa Mon Sep 17 00:00:00 2001 From: iris_cx Date: Fri, 16 Jun 2023 02:39:51 +0000 Subject: [PATCH 06/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'jenkinsfilenew=5Fap?= =?UTF-8?q?i'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfilenew_api b/jenkinsfilenew_api index cd5ad21..542ab8e 100644 --- a/jenkinsfilenew_api +++ b/jenkinsfilenew_api @@ -6,7 +6,7 @@ podTemplate { env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/OperationalService.git" stage('Run shell') { - git branch: '*/dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" + git branch: 'dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" container('image-builder') { sh''' From 9efc13a00ff8902e011c53aa10ade66df412b17c Mon Sep 17 00:00:00 2001 From: iris_cx Date: Fri, 16 Jun 2023 02:48:55 +0000 Subject: [PATCH 07/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'jenkinsfilenew=5Fwe?= =?UTF-8?q?b'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_web | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkinsfilenew_web b/jenkinsfilenew_web index 0fc6880..62c1974 100644 --- a/jenkinsfilenew_web +++ b/jenkinsfilenew_web @@ -3,10 +3,10 @@ podTemplate { env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${IOT}/${JOB_NAME}" env.IMAGE_NAME_SHORT = "${IOT}/${JOB_NAME}" - env.GIT_Add = "${GIT_ADDRESS}/free-sun/OperationalService/src/branch/dev/web" + env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/OperationalService.git" stage('Run shell') { - git credentialsId: 'gitea-builder', url: 'https://gitea.anxinyun.cn/free-sun/OperationalService.git' + git branch: 'dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" container('image-builder') { sh''' From 401637196eb3e03fcf26d0b467190c08ba96fae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E6=96=87=E9=BE=99?= Date: Fri, 16 Jun 2023 02:56:14 +0000 Subject: [PATCH 08/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'jenkinsfilenew=5Fwe?= =?UTF-8?q?b'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_web | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfilenew_web b/jenkinsfilenew_web index 62c1974..e64c4ee 100644 --- a/jenkinsfilenew_web +++ b/jenkinsfilenew_web @@ -11,7 +11,7 @@ podTemplate { container('image-builder') { sh''' find . -depth -name '.svn' -type d -exec rm -rf {} + - /kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./web/Dockerfile --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup + /kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./web/Dockerfilenew --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup ''' } From 869f9ce8061f782277f5332409a2ba64d5f15d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E6=96=87=E9=BE=99?= Date: Fri, 16 Jun 2023 03:03:07 +0000 Subject: [PATCH 09/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'jenkinsfilenew=5Fwe?= =?UTF-8?q?b'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_web | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jenkinsfilenew_web b/jenkinsfilenew_web index e64c4ee..f6bb6a1 100644 --- a/jenkinsfilenew_web +++ b/jenkinsfilenew_web @@ -10,8 +10,11 @@ podTemplate { container('image-builder') { sh''' - find . -depth -name '.svn' -type d -exec rm -rf {} + + pwd + ls -al + /kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./web/Dockerfilenew --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup + ''' } From 3508d6dd45024e4de9f14e255640fded92e5467d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E6=96=87=E9=BE=99?= Date: Fri, 16 Jun 2023 03:09:17 +0000 Subject: [PATCH 10/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'web/Dockerfilenew'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/Dockerfilenew | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/Dockerfilenew b/web/Dockerfilenew index 5ce0be9..b820441 100644 --- a/web/Dockerfilenew +++ b/web/Dockerfilenew @@ -1,6 +1,9 @@ FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12-dev as builder -COPY . /var/app + WORKDIR /var/app + +COPY ./web/ /var/app + EXPOSE 8080 RUN npm config set registry=https://nexus.ngaiot.com/repository/fs-npm/ RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json