[JIRA] [job-dsl-plugin] (JENKINS-27921) Multijob generation failed when upgrading from 1.29 to 1.32

2015-10-05 Thread m...@daniel-spilker.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Spilker closed an issue as Fixed 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-27921 
 
 
 
  Multijob generation failed when upgrading from 1.29 to 1.32  
 
 
 
 
 
 
 
 
 

Change By:
 
 Daniel Spilker 
 
 
 

Status:
 
 Resolved Closed 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [job-dsl-plugin] (JENKINS-27921) Multijob generation failed when upgrading from 1.29 to 1.32

2015-09-16 Thread m...@daniel-spilker.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Spilker resolved as Fixed 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-27921 
 
 
 
  Multijob generation failed when upgrading from 1.29 to 1.32  
 
 
 
 
 
 
 
 
 

Change By:
 
 Daniel Spilker 
 
 
 

Status:
 
 Open Resolved 
 
 
 

Resolution:
 
 Fixed 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [job-dsl-plugin] (JENKINS-27921) Multijob generation failed when upgrading from 1.29 to 1.32

2015-09-16 Thread m...@daniel-spilker.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Spilker commented on  JENKINS-27921 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Multijob generation failed when upgrading from 1.29 to 1.32  
 
 
 
 
 
 
 
 
 
 
1.39 will contain a fix. I renamed the job method within the phase context to phaseJob to avoid this problem. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [job-dsl-plugin] (JENKINS-27921) Multijob generation failed when upgrading from 1.29 to 1.32

2015-09-16 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 SCM/JIRA link daemon commented on  JENKINS-27921 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Multijob generation failed when upgrading from 1.29 to 1.32  
 
 
 
 
 
 
 
 
 
 
Code changed in jenkins User: Daniel Spilker Path: docs/Home.md docs/Migration.md job-dsl-core/src/main/docs/examples/javaposse/jobdsl/dsl/DslFactory/multiJob.groovy job-dsl-core/src/main/docs/examples/javaposse/jobdsl/dsl/helpers/step/MultiJobStepContext/phase.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/step/PhaseContext.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/step/PhaseJobContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/step/MultiJobStepContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/8fb987566ac51e0857ae9ed3ab05ddb0bebdb1aa Log: added phaseJob method, deprecated job and jobName methods 
JENKINS-27921 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [job-dsl-plugin] (JENKINS-27921) Multijob generation failed when upgrading from 1.29 to 1.32

2015-09-16 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 SCM/JIRA link daemon commented on  JENKINS-27921 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Multijob generation failed when upgrading from 1.29 to 1.32  
 
 
 
 
 
 
 
 
 
 
Code changed in jenkins User: Daniel Spilker Path: docs/Home.md docs/Migration.md job-dsl-core/src/main/docs/examples/javaposse/jobdsl/dsl/DslFactory/multiJob.groovy job-dsl-core/src/main/docs/examples/javaposse/jobdsl/dsl/helpers/step/MultiJobStepContext/phase.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/step/PhaseContext.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/step/PhaseJobContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/step/MultiJobStepContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/847a54f68500bd53f63734944ca31861f9919f3c Log: Merge pull request #612 from daspilker/JENKINS-27921 
JENKINS-27921 added phaseJob method, deprecated job and jobName methods 
Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/ba5015dd388b...847a54f68500 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [job-dsl-plugin] (JENKINS-27921) Multijob generation failed when upgrading from 1.29 to 1.32

2015-04-14 Thread m...@daniel-spilker.com (JIRA)














































Daniel Spilker
 updated  JENKINS-27921


Multijob generation failed when upgrading from 1.29 to 1.32
















Change By:


Daniel Spilker
(14/Apr/15 7:46 AM)




Priority:


Critical
Minor



























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


[JIRA] [job-dsl-plugin] (JENKINS-27921) Multijob generation failed when upgrading from 1.29 to 1.32

2015-04-14 Thread m...@daniel-spilker.com (JIRA)














































Daniel Spilker
 commented on  JENKINS-27921


Multijob generation failed when upgrading from 1.29 to 1.32















Yes, it's a regression, but one that is probably not going to be fixed.

It's a thing you have to be aware of when using loop closures. It also happens for other parts of the DSL, see JENKINS-27492. If you use a for loop, you do not need the workaround because for loops are not implemented by closures.



























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


[JIRA] [job-dsl-plugin] (JENKINS-27921) Multijob generation failed when upgrading from 1.29 to 1.32

2015-04-14 Thread geoffroy.jabou...@gmail.com (JIRA)














































Geoffroy Jabouley
 commented on  JENKINS-27921


Multijob generation failed when upgrading from 1.29 to 1.32















Hi Daniel

Thanks a lot for the explanation.

Is this still a regression in the job-dsl plugin, as it was doing fine in prior versions without the "delegate.job" call? Or is this behavior the correct one?



























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


[JIRA] [job-dsl-plugin] (JENKINS-27921) Multijob generation failed when upgrading from 1.29 to 1.32

2015-04-13 Thread m...@daniel-spilker.com (JIRA)














































Daniel Spilker
 commented on  JENKINS-27921


Multijob generation failed when upgrading from 1.29 to 1.32















I reduced your DSL script, so that it's self-contained and still reproduces your problem:


job(type: Multijob) {
steps {
phase ('Build', 'COMPLETED') {
(1..3).each { int number ->
job("project-$number") {
prop('FOO', 'BAR')
}
}
}
}
}


The problem is that the closure argument to each (or in your case splitEachLine) uses the default closure resolve strategy of OWNER_FIRST. This resolve strategy tells Groovy to call the top-level job method instead of the one from the multi-job phase context.

You can fix that by calling delegate.job(...) which will use the job method from the multi-job phase context:


job(type: Multijob) {
steps {
phase ('Build', 'COMPLETED') {
(1..3).each { int number ->
delegate.job("project-$number") {
prop('FOO', 'BAR')
}
}
}
}
}




























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


[JIRA] [job-dsl-plugin] (JENKINS-27921) Multijob generation failed when upgrading from 1.29 to 1.32

2015-04-13 Thread geoffroy.jabou...@gmail.com (JIRA)














































Geoffroy Jabouley
 created  JENKINS-27921


Multijob generation failed when upgrading from 1.29 to 1.32















Issue Type:


Bug



Assignee:


Daniel Spilker



Attachments:


jobdsl-multijob-groovyloop.txt



Components:


job-dsl-plugin



Created:


13/Apr/15 4:05 PM



Description:


I am using jobdsl plugin to generate a multijob.

The included code snippet works well with v1.29.

It uses a configuration.txt file in the workspace containing several 3-uples data: name,path,config
It then iterates on each uple and add the corresponding job to the multijob phase.

When upgrading to 1.32 (to get support for Multijob 'ALWAYS' continuation condition), i am facing 2 deprecation warnings AND the following error:


Processing provided DSL script
Warning: job is deprecated (DSL script, line 3)
Warning: name is deprecated (DSL script, line 4)
FATAL: No signature of method: javaposse.jobdsl.dsl.jobs.FreeStyleJob.prop() is applicable for argument types: (java.lang.String, java.lang.String) values: [RELEASE_BUILD_NUMBER, ${RELEASE_BUILD_NUMBER}]
Possible solutions: grep(), dump(), grep(java.lang.Object), wait(), any(), find()
groovy.lang.MissingMethodException: No signature of method: javaposse.jobdsl.dsl.jobs.FreeStyleJob.prop() is applicable for argument types: (java.lang.String, java.lang.String) values: [RELEASE_BUILD_NUMBER, ${RELEASE_BUILD_NUMBER}]
Possible solutions: grep(), dump(), grep(java.lang.Object), wait(), any(), find()
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
	at script142894070212564931370$_run_closure1_closure3_closure6_closure7_closure8.doCall(script142894070212564931370.groovy:29)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:903)
	at groovy.lang.Closure.call(Closure.java:415)
	at groovy.lang.Closure.call(Closure.java:428)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.with(DefaultGroovyMethods.java:196)
	at org.codehaus.groovy.runtime.dgm$926.invoke(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:313)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:64)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:69)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at javaposse.jobdsl.dsl.JobParent.processJob(JobParent.groovy:73)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:272)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArra