From 991b5a99e836180516f7db7d46d1914a6b0f7f13 Mon Sep 17 00:00:00 2001 From: iris_cx Date: Fri, 4 Aug 2023 14:18:59 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'jenkinsfilenew=5Fnode?= =?UTF-8?q?'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jenkinsfilenew_node | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 jenkinsfilenew_node diff --git a/jenkinsfilenew_node b/jenkinsfilenew_node new file mode 100644 index 00000000..317b5a5a --- /dev/null +++ b/jenkinsfilenew_node @@ -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/Highways4Good.git" + + stage('Run shell') { + git branch: 'dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" + + container('image-builder') { + sh''' + /kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./scripts/1.3.1/data/1_insert_report_data/Dockerfilenew --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 6836d1f52579be3bcc2b73e980eefb2b31ed3b41 Mon Sep 17 00:00:00 2001 From: iris_cx Date: Fri, 4 Aug 2023 14:19:33 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'scripts/1.3.1/data/1?= =?UTF-8?q?=5Finsert=5Freport=5Fdata/Dockerfilenew'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/1.3.1/data/1_insert_report_data/Dockerfilenew | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 scripts/1.3.1/data/1_insert_report_data/Dockerfilenew diff --git a/scripts/1.3.1/data/1_insert_report_data/Dockerfilenew b/scripts/1.3.1/data/1_insert_report_data/Dockerfilenew new file mode 100644 index 00000000..4dbd4baf --- /dev/null +++ b/scripts/1.3.1/data/1_insert_report_data/Dockerfilenew @@ -0,0 +1,7 @@ +FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2 +COPY . /var/app +WORKDIR /var/app +RUN npm cache clean -f +RUN rm -rf package-lock.json +RUN npm install --registry http://10.8.30.22:7000 +CMD ["node", "index.js"] \ No newline at end of file