更新 'Jenkinsfile'

main
newrain001 11 months ago
parent 5a4884ff04
commit b47832f2cf
  1. 25
      Jenkinsfile

25
Jenkinsfile vendored

@ -9,7 +9,13 @@ pipeline {
agent { agent {
kubernetes { kubernetes {
cloud "${KUBERNETES_NAME}" cloud "${KUBERNETES_NAME}"
slaveConnectTimeout 1200 // 增加超时时间为60分钟
containerTemplate {
name 'docker'
image 'docker:19.03.15-git'
tty true
command 'cat'
}
yaml """ yaml """
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@ -23,20 +29,6 @@ spec:
- mountPath: "/etc/localtime" - mountPath: "/etc/localtime"
name: "volume-2" name: "volume-2"
readOnly: false 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 - name: kubectl
image: bitnami/kubectl:1.22.0 image: bitnami/kubectl:1.22.0
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
@ -67,9 +59,6 @@ spec:
- name: volume-docker - name: volume-docker
hostPath: hostPath:
path: "/var/run/docker.sock" path: "/var/run/docker.sock"
- name: volume-hosts
hostPath:
path: /etc/hosts
""" """
} }
} }

Loading…
Cancel
Save