From eb7e61bec2186721426b549be7e33a3a5f89e5f0 Mon Sep 17 00:00:00 2001 From: iris_cx Date: Wed, 28 Jun 2023 07:20:46 +0000 Subject: [PATCH] =?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 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 jenkinsfilenew_web diff --git a/jenkinsfilenew_web b/jenkinsfilenew_web new file mode 100644 index 00000000..feccdcff --- /dev/null +++ b/jenkinsfilenew_web @@ -0,0 +1,25 @@ +podTemplate { + node('pod-templ-jenkins-slave-common') { + + env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${IOT}/${JOB_NAME}" + env.IMAGE_NAME_SHORT = "${IOT}/${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''' + pwd + ls -al + + /kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./web/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