Issue Type: Bug Bug
Assignee: Jesse Glick
Components: workflow-plugin
Created: 18/Jan/15 7:04 PM
Description:

At least some closures are executed only once inside of Groovy CPS DSL scripts managed by the workflow plugin.

Steps to reproduce:
1. Create a new workflow with the following script:
node {
[1, 2, 3].each { println it }

println "abc".replaceAll(/[a-z]/) { it.toUpperCase() }
}
2. Build the workflow

Actual output:
Started by user anonymous
Running: Allocate node : Start
Running on master in /var/lib/jenkins/jobs/testflow/workspace
Running: Allocate node : Body : Start
Running: Print Message
1
Running: Print Message
A
Running: Allocate node : Body : End
Running: Allocate node : End
Running: End of Workflow
Finished: SUCCESS

Expected output:
Started by user anonymous
Running: Allocate node : Start
Running on master in /var/lib/jenkins/jobs/testflow/workspace
Running: Allocate node : Body : Start
Running: Print Message
1
Running: Print Message
2
Running: Print Message
3
Running: Print Message
ABC
Running: Allocate node : Body : End
Running: Allocate node : End
Running: End of Workflow
Finished: SUCCESS

Environment: Jenkins LTS 1.580.2 and workflow-plugin 1.1. Both are the latest versions at the time of this writing. Tested on RHEL 6 with OpenJDK 1.7 and Fedora 21 with OpenJDK 1.8.
Project: Jenkins
Priority: Major Major
Reporter: Daniel Tschan
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to