[JIRA] (JENKINS-59911) Different behavior for groovy in pipeline and script console

6 views
Skip to first unread message

sparshev@griddynamics.com (JIRA)

unread,
Oct 23, 2019, 7:26:03 PM10/23/19
to jenkinsc...@googlegroups.com
Sergei Parshev created an issue
 
Jenkins / Bug JENKINS-59911
Different behavior for groovy in pipeline and script console
Issue Type: Bug Bug
Assignee: vjuranek
Components: groovy-plugin, workflow-cps-plugin
Created: 2019-10-23 23:25
Priority: Minor Minor
Reporter: Sergei Parshev

Hello Guys,

I found some weird behavior difference in executing the same groovy logic in pipeline from the original groovy 2.4.12 (used in the latest LTS Jenkins by default).

The next logic is working in different ways for pipeline and script console:

def b = 3
def a = b = 4
print("${a} ${b}")
  • Groovy console print output: "4 4"
  • Pipeline echo output: "null 4"

Who can tell why? I just can't catch the difference.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

sparshev@griddynamics.com (JIRA)

unread,
Oct 25, 2019, 5:14:03 PM10/25/19
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Oct 25, 2019, 5:19:02 PM10/25/19
to jenkinsc...@googlegroups.com
Jesse Glick assigned an issue to Unassigned
 

A bug in https://github.com/cloudbees/groovy-cps presumably.

Change By: Jesse Glick
Component/s: groovy-plugin
Assignee: vjuranek
Reply all
Reply to author
Forward
0 new messages