[JIRA] (JENKINS-43035) expression does not see imported classes

2019-10-22 Thread bitwise...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Liam Newman closed an issue as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Bulk closing resolved issues.   
 

  
 
 
 
 

 
 Jenkins /  JENKINS-43035  
 
 
  _expression_ does not see imported classes   
 

  
 
 
 
 

 
Change By: 
 Liam Newman  
 
 
Status: 
 Resolved Closed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.180139.149019614.16413.1571801051688%40Atlassian.JIRA.


[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-27 Thread gastersta...@ehealthexperts.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Stefan Gasterstädt edited a comment on  JENKINS-43035  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: _expression_ does not see imported classes   
 

  
 
 
 
 

 
 As far as I understand, scripting is a valid option for declarative Jenkinsfiles. That is what{code}steps {  script { ... }}{code}is made for. Similar, the {{_expression_}} block of {{when}} is made for script blocks.Don't you think, that if scripting a when- conditionif condition  is not a suitable option, a declarative Jenkinsfile should not offer {code}when {  _expression_ { ... }}{code}at all?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-27 Thread gastersta...@ehealthexperts.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Stefan Gasterstädt edited a comment on  JENKINS-43035  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: _expression_ does not see imported classes   
 

  
 
 
 
 

 
 As far as I understand, scripting is a valid option for declarative Jenkinsfiles. That is what{code :groovy }steps {  script { ... }}{code}is made for. Similar, the {{_expression_}} block of {{when}} is made for script blocks.Don't you think, that if scripting a when-conditionif is not a suitable option, a declarative Jenkinsfile should not offer {code :groovy }when {  _expression_ { ... }}{code}at all?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-27 Thread gastersta...@ehealthexperts.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Stefan Gasterstädt commented on  JENKINS-43035  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: _expression_ does not see imported classes   
 

  
 
 
 
 

 
 As far as I understand, scripting is a valid option for declarative Jenkinsfiles. That is what 

 

Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, _javascript_, none, sql, xhtml, xml


steps {
  script { ... }
}
 

 is made for. Similar, the _expression_ block of when is made for script blocks. Don't you think, that if scripting a when-conditionif is not a suitable option, a declarative Jenkinsfile should not offer  

 

Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, _javascript_, none, sql, xhtml, xml


when {
  _expression_ { ... }
}
 

 at all?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-24 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-43035  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: _expression_ does not see imported classes   
 

  
 
 
 
 

 
 Maybe you should just get rid of scripted expressions. People who need to do fancy things like that can just use scripted Pipeline.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-23 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-43035  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: _expression_ does not see imported classes   
 

  
 
 
 
 

 
 New, better PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/144! This will require changing your Jenkinsfile to use the libraries directive, but I think it's the right long-term solution anyway. The original PR is now closed.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-23 Thread gastersta...@ehealthexperts.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Stefan Gasterstädt edited a comment on  JENKINS-43035  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: _expression_ does not see imported classes   
 

  
 
 
 
 

 
 According to your groovy-unit-test [libraryObjectInWhenExpression.groovy ]( | https://github.com/abayer/pipeline-model-definition-plugin/blob/12a0443c5cece4a4a3b04f16d51a4f3f0bd3b2ca/pipeline-model-definition/src/test/resources/libraryObjectInWhenExpression.groovy ) ] , this looks exactly similar to my situation.Thank you, that was a fast reaction.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-23 Thread gastersta...@ehealthexperts.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Stefan Gasterstädt commented on  JENKINS-43035  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: _expression_ does not see imported classes   
 

  
 
 
 
 

 
 According to your groovy-unit-test [libraryObjectInWhenExpression.groovy](https://github.com/abayer/pipeline-model-definition-plugin/blob/12a0443c5cece4a4a3b04f16d51a4f3f0bd3b2ca/pipeline-model-definition/src/test/resources/libraryObjectInWhenExpression.groovy), this looks exactly similar to my situation. Thank you, that was a fast reaction.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-22 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer updated  JENKINS-43035  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-43035  
 
 
  _expression_ does not see imported classes   
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Status: 
 In  Progress  Review  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-22 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-43035  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: _expression_ does not see imported classes   
 

  
 
 
 
 

 
 I've got a PR up for this at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/143, but I'm not sure it's the right solution yet. =)  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-22 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer started work on  JENKINS-43035  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Status: 
 Open In Progress  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43035) expression does not see imported classes

2017-03-22 Thread gastersta...@ehealthexperts.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Stefan Gasterstädt created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-43035  
 
 
  _expression_ does not see imported classes   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Andrew Bayer  
 
 
Components: 
 pipeline-model-definition-plugin  
 
 
Created: 
 2017/Mar/22 3:22 PM  
 
 
Environment: 
 Jenkins 2.50  Pipeline Model Definition PlugIn 1.1.1  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Stefan Gasterstädt  
 

  
 
 
 
 

 
 The following Jenkinsfile snippet shows the fully quallified usage of an imported Type within an `_expression_` block. The whole Jenkinsfile can be executed without a failure. ```groovy @Library('SomeManagedLibID') _ import some.package.MyType [...] stages {   stage('Foobar') {     when {   _expression_ {     def xyz = new some.package.MyType()         [...]   } ``` Whereas the second snippet uses the short name (because it is imported) ... ```groovy @Library('SomeManagedLibID') _ import some.package.MyType [...] stages {   stage('Foobar') {     when {   _expression_ {     def xyz = new MyType()         [...]   } ``` ... but in this case, the execution fails with a ProxyException: ``` Bitbucket] Build result notified hudson.remoting.ProxyException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script2.groovy: 2: unable to resolve class MyType  @ line 2, column 10. def cg = new MyType() ^ 1 error  at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:958) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:605) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:554) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at