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 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