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 """ } }