From 20a27e934c0619f3c9213adfd8a1f86773e50d53 Mon Sep 17 00:00:00 2001 From: sunyue Date: Mon, 24 Jul 2023 05:51:53 +0000 Subject: [PATCH 1/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'Jenkinsfile=5Fscreen'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Jenkinsfile_screen --- Jenkinsfile_screen | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Jenkinsfile_screen diff --git a/Jenkinsfile_screen b/Jenkinsfile_screen new file mode 100644 index 0000000..c96a0c0 --- /dev/null +++ b/Jenkinsfile_screen @@ -0,0 +1,21 @@ +podTemplate { + node('pod-templ-jenkins-slave-common') { + + env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${SMARTCITY}/${JOB_NAME}" + env.IMAGE_NAME_SHORT = "${SMARTCITY}/${JOB_NAME}" + env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/GovernmentDataResourceCenter.git" + + stage('Run shell') { + git branch: 'master', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" + + container('image-builder') { + sh''' + /kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./super-screen/Dockerfile --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup + ''' + } + + buildName "${IMAGE_NAME_SHORT}:${IMAGE_VERSION}" + buildDescription "${IMAGE_NAME}:${IMAGE_VERSION}" + } + } +} \ No newline at end of file From 6bc2cfe561412d84ca4e6cef2b6be468b11ff1dc Mon Sep 17 00:00:00 2001 From: sunyue Date: Mon, 24 Jul 2023 05:52:56 +0000 Subject: [PATCH 2/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'super-screen/Dockerfi?= =?UTF-8?q?le'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- super-screen/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/super-screen/Dockerfile b/super-screen/Dockerfile index 08dc512..ceacae2 100644 --- a/super-screen/Dockerfile +++ b/super-screen/Dockerfile @@ -8,12 +8,12 @@ EXPOSE 8080 RUN npm cache clean -f -RUN npm install --registry http://10.8.30.22:7000 --legacy-peer-deps +RUN npm install --registry https://nexus.ngaiot.com/repository/fs-npm/ --legacy-peer-deps RUN npm run build RUN rm -rf client/src RUN rm -rf node_modules -RUN npm install --production --registry http://10.8.30.22:7000 +RUN npm install --production --registry https://nexus.ngaiot.com/repository/fs-npm/ #RUN npm cache clean -f && npm install --production --force --registry http://10.8.30.22:7000 CMD ["-u", "http://localhost:8088"] From 0f59547fe19dcb84064d8e8d5d345f9b31f7ab25 Mon Sep 17 00:00:00 2001 From: sunyue Date: Mon, 24 Jul 2023 05:55:30 +0000 Subject: [PATCH 3/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'web/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/Dockerfile b/web/Dockerfile index 08dc512..ceacae2 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -8,12 +8,12 @@ EXPOSE 8080 RUN npm cache clean -f -RUN npm install --registry http://10.8.30.22:7000 --legacy-peer-deps +RUN npm install --registry https://nexus.ngaiot.com/repository/fs-npm/ --legacy-peer-deps RUN npm run build RUN rm -rf client/src RUN rm -rf node_modules -RUN npm install --production --registry http://10.8.30.22:7000 +RUN npm install --production --registry https://nexus.ngaiot.com/repository/fs-npm/ #RUN npm cache clean -f && npm install --production --force --registry http://10.8.30.22:7000 CMD ["-u", "http://localhost:8088"] From aeda101d2c6b540a7e35d2e4f73058538c2fa71e Mon Sep 17 00:00:00 2001 From: sunyue Date: Mon, 24 Jul 2023 05:55:45 +0000 Subject: [PATCH 4/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'jenkinsfilenew=5Fweb'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_web | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 jenkinsfilenew_web diff --git a/jenkinsfilenew_web b/jenkinsfilenew_web new file mode 100644 index 0000000..bfc589f --- /dev/null +++ b/jenkinsfilenew_web @@ -0,0 +1,21 @@ +podTemplate { + node('pod-templ-jenkins-slave-common') { + + env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${SMARTCITY}/${JOB_NAME}" + env.IMAGE_NAME_SHORT = "${SMARTCITY}/${JOB_NAME}" + env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/GovernmentDataResourceCenter.git" + + stage('Run shell') { + git branch: 'master', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" + + container('image-builder') { + sh''' + /kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./web/Dockerfile --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup + ''' + } + + buildName "${IMAGE_NAME_SHORT}:${IMAGE_VERSION}" + buildDescription "${IMAGE_NAME}:${IMAGE_VERSION}" + } + } +} \ No newline at end of file From 665898a0f922b104416e282f80cce64d36558a53 Mon Sep 17 00:00:00 2001 From: sunyue Date: Mon, 24 Jul 2023 05:57:07 +0000 Subject: [PATCH 5/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'api/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 10fc786..8b6b379 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -6,11 +6,11 @@ WORKDIR /var/app EXPOSE 8080 -RUN npm config set registry=http://10.8.30.22:7000 +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 RUN npm cache clean -f RUN rm -rf package-lock.json -RUN npm install --registry http://10.8.30.22:7000 +RUN npm install --registry https://nexus.ngaiot.com/repository/fs-npm/ FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12 From 03225a0b551b90cf4b58dce4e5197ac831be73f6 Mon Sep 17 00:00:00 2001 From: sunyue Date: Mon, 24 Jul 2023 05:57:49 +0000 Subject: [PATCH 6/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'jenkinsfilenew=5Fapi'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_api | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 jenkinsfilenew_api diff --git a/jenkinsfilenew_api b/jenkinsfilenew_api new file mode 100644 index 0000000..f2be615 --- /dev/null +++ b/jenkinsfilenew_api @@ -0,0 +1,21 @@ +podTemplate { + node('pod-templ-jenkins-slave-common') { + + env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${SMARTCITY}/${JOB_NAME}" + env.IMAGE_NAME_SHORT = "${SMARTCITY}/${JOB_NAME}" + env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/GovernmentDataResourceCenter.git" + + stage('Run shell') { + git branch: 'master', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" + + container('image-builder') { + sh''' + /kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./api/Dockerfile --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup + ''' + } + + buildName "${IMAGE_NAME_SHORT}:${IMAGE_VERSION}" + buildDescription "${IMAGE_NAME}:${IMAGE_VERSION}" + } + } +} \ No newline at end of file From 1e06575d04c89ae54865e9c5cb813e48d5c883d6 Mon Sep 17 00:00:00 2001 From: sunyue Date: Mon, 24 Jul 2023 06:03:34 +0000 Subject: [PATCH 7/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'super-screen/Dockerfi?= =?UTF-8?q?le'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- super-screen/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/super-screen/Dockerfile b/super-screen/Dockerfile index ceacae2..e593610 100644 --- a/super-screen/Dockerfile +++ b/super-screen/Dockerfile @@ -1,6 +1,6 @@ FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2 -COPY . /var/app +COPY ./super-screen /var/app WORKDIR /var/app From 5bf0a668b163bab77a4b73352605e2ba4777a9f8 Mon Sep 17 00:00:00 2001 From: sunyue Date: Mon, 24 Jul 2023 06:07:17 +0000 Subject: [PATCH 8/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'api/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/Dockerfile b/api/Dockerfile index 8b6b379..f651bda 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,6 +1,6 @@ FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12-dev as builder -COPY . /var/app +COPY ./api/ /var/app WORKDIR /var/app