From 8cfba119ff2f19f6ea5aa8e26a81449654916760 Mon Sep 17 00:00:00 2001 From: iris_cx Date: Mon, 12 Jun 2023 08:03:42 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20''?= 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..ea99169 --- /dev/null +++ b/jenkinsfilenew_web @@ -0,0 +1,21 @@ +podTemplate { + node('pod-templ-jenkins-slave-common') { + + env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${IOT}/${JOB_NAME}" + env.IMAGE_NAME_SHORT = "${IOT}/${JOB_NAME}" + env.GIT_Add = "${GIT_ADDRESS}/free-sun/OperationalService/src/branch/dev/web" + + stage('Run shell') { + git credentialsId: 'gitea-builder', url: 'https://gitea.anxinyun.cn/free-sun/OperationalService.git' + + 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}" + } + } +}