From b47832f2cfb88a1a742efadca506c83fb8e38b83 Mon Sep 17 00:00:00 2001 From: newrain001 Date: Wed, 20 Dec 2023 20:07:44 +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 | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ff0b2bf..8ed6e4c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,13 @@ pipeline { agent { kubernetes { cloud "${KUBERNETES_NAME}" - slaveConnectTimeout 1200 + // 增加超时时间为60分钟 + containerTemplate { + name 'docker' + image 'docker:19.03.15-git' + tty true + command 'cat' + } yaml """ apiVersion: v1 kind: Pod @@ -23,20 +29,6 @@ spec: - mountPath: "/etc/localtime" name: "volume-2" readOnly: false - - name: docker - image: docker:19.03.15-git - imagePullPolicy: IfNotPresent - tty: true - volumeMounts: - - mountPath: "/etc/localtime" - name: "volume-2" - readOnly: false - - mountPath: "/var/run/docker.sock" - name: "volume-docker" - readOnly: false - - mountPath: "/etc/hosts" - name: "volume-hosts" - readOnly: false - name: kubectl image: bitnami/kubectl:1.22.0 imagePullPolicy: IfNotPresent @@ -67,9 +59,6 @@ spec: - name: volume-docker hostPath: path: "/var/run/docker.sock" - - name: volume-hosts - hostPath: - path: /etc/hosts """ } }