From 1b995c0fa400b0c9abef01edca9c69ba461ed7b6 Mon Sep 17 00:00:00 2001 From: newrain001 Date: Wed, 20 Dec 2023 20:40:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'Jenkinsfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1df0576..a54c2c3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,12 @@ pipeline { + environment { + KUBERNETES_NAME = "kubernetes" + DOCKER_REPOSITORY_CREDENTIAL_ID = "ea3d4aae-783b-460f-9cd0-931c53c021db" + HARBOR_HOST = "http://192.168.75.149:30002" + NAMESPACE_NAME = "library" + REPOSITORY_NAME = "my-web-app" + TAG = "v1.0" + } agent { kubernetes { cloud "${env.KUBERNETES_NAME}" @@ -33,14 +41,6 @@ spec: """ } } - environment { - KUBERNETES_NAME = "kubernetes" - DOCKER_REPOSITORY_CREDENTIAL_ID = "ea3d4aae-783b-460f-9cd0-931c53c021db" - HARBOR_HOST = "http://192.168.75.149:30002" - NAMESPACE_NAME = "library" - REPOSITORY_NAME = "my-web-app" - TAG = "v1.0" - } stages { stage('构建镜像') { steps {