[JIRA] (JENKINS-42360) Globals not accessible in Declarative Pipeline outside script directive

1 view
Skip to first unread message

bitwiseman@gmail.com (JIRA)

unread,
Feb 27, 2017, 6:55:04 PM2/27/17
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
 
Jenkins / Improvement JENKINS-42360
Globals not accessible in Declarative Pipeline outside script directive
Change By: Liam Newman
See https://github.com/jenkins-infra/jenkins.io/pull/611

I need go back over this to see what the actually behavior is.
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

bitwiseman@gmail.com (JIRA)

unread,
Feb 27, 2017, 6:55:04 PM2/27/17
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
Change By: Liam Newman
Summary: Globals not accessible in Declarative Pipeline . outside script directive

bitwiseman@gmail.com (JIRA)

unread,
Feb 27, 2017, 6:57:01 PM2/27/17
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
See https://github.com/jenkins-infra/jenkins.io/pull/611

I need go back over this to see what the actually behavior is.

  Steps from shared libraries work, but Globals (defined using class) are not.  Not sure about what happens without a class.  


bitwiseman@gmail.com (JIRA)

unread,
Feb 27, 2017, 7:09:02 PM2/27/17
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
See https://github.com/jenkins-infra/jenkins.io/pull/611

I need go back over this Basically, it was a design decision to see what the actually behavior is not allow any form of {{thing .   Steps from shared libraries work, but Globals method ( defined using class ) }} in Declarative.  It is possible to circumvent this in several ways, and there are not bugs that might address this .   Not sure about what happens without a class.  


bitwiseman@gmail.com (JIRA)

unread,
Feb 27, 2017, 7:10:04 PM2/27/17
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
See https://github.com/jenkins-infra/jenkins.io/pull/611

Basically, it was a design decision to not allow any form of {{thing.method()}} in Declarative.
  This was needed to support validation.  

  It is possible to circumvent this in several ways , and there are bugs that might address this , but it is a hard problem .

andrew.bayer@gmail.com (JIRA)

unread,
Feb 27, 2017, 7:17:01 PM2/27/17
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Improvement JENKINS-42360
 
Change By: Andrew Bayer
Status: Open In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Feb 27, 2017, 7:18:03 PM2/27/17
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Improvement JENKINS-42360
 
Re: Globals not accessible in Declarative Pipeline outside script directive

I've got a PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/127 with better error reporting of an object method call - doesn't enable usage of them, but does at least explain the error.

scm_issue_link@java.net (JIRA)

unread,
Mar 1, 2017, 11:11:05 AM3/1/17
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Andrew Bayer
Path:
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
pipeline-model-definition/src/test/resources/libraryObjectDefinedOutsidePipeline.groovy
pipeline-model-definition/src/test/resources/libraryObjectOutsideScript.groovy
http://jenkins-ci.org/commit/pipeline-model-definition-plugin/2750f57fad326f173fb81012d522dfc7639197b3
Log:
JENKINS-42360 Improve validation on object method calls

Actually distinguish object method calls from generalized "expected a
symbol", and report accordingly.

scm_issue_link@java.net (JIRA)

unread,
Mar 1, 2017, 11:11:05 AM3/1/17
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Andrew Bayer
Path:
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
pipeline-model-definition/src/test/resources/libraryObjectDefinedOutsidePipeline.groovy
pipeline-model-definition/src/test/resources/libraryObjectOutsideScript.groovy

JENKINS-42360 Improve validation on object method calls

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:02 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Won't Fix
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages