Skip to content

Commit bf39b64

Browse files
committed
Test that unique nodes can be used
Test for #256
1 parent bb91ab3 commit bf39b64

File tree

1 file changed

+5
-3
lines changed
  • src/test/resources/org/csanchez/jenkins/plugins/kubernetes/pipeline

1 file changed

+5
-3
lines changed

src/test/resources/org/csanchez/jenkins/plugins/kubernetes/pipeline/runInPod.groovy

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
podTemplate(label: 'mypod', containers: [
1+
def label = "mypod-${UUID.randomUUID().toString()}"
2+
3+
podTemplate(label: label, containers: [
24
containerTemplate(name: 'busybox', image: 'busybox', ttyEnabled: true, command: '/bin/cat'),
35
]) {
46

5-
node ('mypod') {
7+
node (label) {
68
stage('Run') {
79
container('busybox') {
810
sh """
@@ -15,4 +17,4 @@ podTemplate(label: 'mypod', containers: [
1517
}
1618
}
1719
}
18-
}
20+
}

0 commit comments

Comments
 (0)