File tree Expand file tree Collapse file tree 1 file changed +30
-29
lines changed
src/test/resources/org/csanchez/jenkins/plugins/kubernetes/pipeline Expand file tree Collapse file tree 1 file changed +30
-29
lines changed Original file line number Diff line number Diff line change 11timeout ([time : 10 , unit : ' MINUTES' ]) {
2- def label = " jenkins-slave-${ UUID.randomUUID().toString()} "
3- podTemplate(
4- label : label,
5- yaml : '''
2+ podTemplate(yaml : '''
3+ apiVersion: v1
4+ kind: Pod
65spec:
6+ volumes:
7+ - name: docker-socket
8+ emptyDir: {}
79 containers:
8- - name: jnlp
9- ''' ,
10- containers : [
11- containerTemplate(
12- name : ' docker-dind' ,
13- image : ' docker:19-dind' ,
14- alwaysPullImage : true ,
15- privileged : true ,
16- envVars : [
17- envVar(key : ' DOCKER_TLS_CERTDIR' , value : ' ' )
18- ],
19- ),
20- containerTemplate(
21- name : ' docker' ,
22- image : ' docker:19' ,
23- alwaysPullImage : true ,
24- ttyEnabled : true ,
25- command : ' cat' ,
26- envVars : [
27- envVar(key : ' DOCKER_HOST' , value : ' tcp://localhost:2375' )
28- ],
29- ),
30- ]
31- ) {
32- node(label) {
10+ - name: docker
11+ image: docker:20.10.21
12+ readinessProbe:
13+ exec:
14+ command:
15+ - sh
16+ - -c
17+ - ls -S /var/run/docker.sock
18+ command:
19+ - sleep
20+ args:
21+ - 99d
22+ volumeMounts:
23+ - name: docker-socket
24+ mountPath: /var/run
25+ - name: docker-daemon
26+ image: docker:20.10.21-dind
27+ securityContext:
28+ privileged: true
29+ volumeMounts:
30+ - name: docker-socket
31+ mountPath: /var/run
32+ ''' ) {
33+ node(POD_LABEL ) {
3334 stage(' build' ) {
3435 container(' docker' ) {
3536 sh ' echo "FROM ubuntu:bionic" > Dockerfile'
You can’t perform that action at this time.
0 commit comments