with version 1.0.8 the untilEach function throws an IndexOutOfBoundsException.
we use the untilEach function to wait for pods to be running after a rollout of a deploymentConfig.
during the iteration the jenkins console output shows the following error:
watch closure threw an exception: "java.lang.IndexOutOfBoundsException: Index: 1, Size: 1; Index: 1, Size: 1".
the untilEach iteration will not get the true-condition to terminate the watch on the pods to be running.
here is a code example, which runs into the error described above:
def dcRelatedPods = deploymentConfig.related('pods')
def podObj
dcRelatedPods.untilEach(1) {
podObj = it.object()
return podObj.status.phase == 'Running'
}
With the version 1.0.2-1.0.7 the code runs perfectly.
Is it a new behaviour or is it a bug?
Please provide help.
Thank you
Tom