I'm trying to write a common library building Docker images from Dockerfile. I wrote a reusable global pipeline, where I'm iterating over Dockerfile lines. I tried to use Java 8 Streams, however I ended up with issue potentially related to
JENKINS-26307 and JENKINS-42769, which is not related not to Groovy functional features, but Java 8 feature.
An example code used:
Whole stream execution results in "false" boolean result, instead of a list. Even complex streams are passing through, but evaluates to "false". When using more complex stream like:
it enters only first filter expression and does not evaluate the rest.
When replaced functional style code with typical imperative style (for loop) it works.