-
Improvement
-
Resolution: Not A Defect
-
Major
-
None
Hello.
When my code compiles with heavy CPU and memory,
I think Jenkins create one pod and create several containers is not good idea.
I think Jenkins create several pods is good idea.
Am I right?
Is it possible to use like below ? I think this is not correct DSL. and I can't find right way.
podTemplate( label: 'mypod1', containers: [ containerTemplate(name: 'maven1', image: 'maven', ttyEnabled: true, command: 'cat') ], volumes: [ hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock') ] ), podTemplate( label: 'mypod2', containers: [ containerTemplate(name: 'maven2', image: 'maven', ttyEnabled: true, command: 'cat') ], volumes: [ hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock') ] ) { stage('Sync') { parallel Syncfortype1: { node('mypod1') { container(name: 'maven1', shell: '/bin/bash') { sh 'cd ${WORKSPACE}' p4sync blah blah } } }, Syncfortype2: { node('mypod2') { container(name: 'maven2', shell: '/bin/bash') { sh 'cd ${WORKSPACE}' p4sync blah blah } } } } }