更新 'Jenkinsfile'

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

25
Jenkinsfile vendored

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

Loading…
Cancel
Save