From 991b5a99e836180516f7db7d46d1914a6b0f7f13 Mon Sep 17 00:00:00 2001 From: iris_cx Date: Fri, 4 Aug 2023 14:18:59 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'jenkinsfilenew=5Fnode'?= 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