Re: simple build (DSL) for pipeline plugin

2016-04-04 Thread Michael Neale
Good question, no not sure off the top of my head. I know Jesse identified 
a problem recently with checkpoints (and unrelated feature, but touches on 
save program I believe). 

On Monday, April 4, 2016 at 11:29:51 PM UTC+10, Martin d'Anjou wrote:
>
> I have written enough code to occasionally get a serialization error:
> Apr 04, 2016 8:22:44 AM org.jenkinsci.plugins.workflow.cps.CpsThreadGroup 
> saveProgram
> WARNING: program state save failed
> java.io.NotSerializableException: org.codehaus.groovy.runtime.
> HandleMetaClass
>
> Do you know how I can test serialization of the whole "def call(body) { 
> ... }" code and everything it contains (imports, etc.)?
>
> Thanks,
> Martin
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ece169bd-038d-405a-93bb-6f5fe9865dde%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: simple build (DSL) for pipeline plugin

2016-04-04 Thread Martin d'Anjou
I have written enough code to occasionally get a serialization error:
Apr 04, 2016 8:22:44 AM org.jenkinsci.plugins.workflow.cps.CpsThreadGroup 
saveProgram
WARNING: program state save failed
java.io.NotSerializableException: org.codehaus.groovy.runtime.
HandleMetaClass

Do you know how I can test serialization of the whole "def call(body) { ... 
}" code and everything it contains (imports, etc.)?

Thanks,
Martin

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4a58996d-10f7-4f66-b5b9-1de76b3c8884%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: simple build (DSL) for pipeline plugin

2016-03-30 Thread Michael Neale
Yes - interestingly that question/answer comes up a lot. Yes, you have to 
install deps yourself if using Advanced "tab" to install it. 

If you use mvn hpi:run to run it in development you don't need to worry 
about it (which is why few come across this). 

If this bites you enough, might I suggest opening an issue to see if there 
is interest in having an option to automatically install deps of an 
uploaded plugin (that are missing) if it can? 

On Thursday, March 31, 2016 at 4:45:27 AM UTC+11, Martin d'Anjou wrote:
>
> I will reply to my own question: plugins uploaded manually do not fetch 
> their dependencies.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8a379f01-27a2-46fa-a3b4-5dd9537c9e50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: simple build (DSL) for pipeline plugin

2016-03-30 Thread Martin d'Anjou
I will reply to my own question: plugins uploaded manually do not fetch 
their dependencies.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/df21f24c-0f95-4d72-9d54-40a7527aed3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: simple build (DSL) for pipeline plugin

2016-03-13 Thread Michael Neale
Hi Martin. 

Yes that is quite confusing. Well for one, I used the "env" to mean the key 
in a closure that ends up in config, which is slightly naughty, given there 
is already an env global - so probably shouldn't do what I did ;) 

I am not sure why it wouldn't work like that - if you use double quotes, 
then I think it would use string interpolation to expand it (perhaps there 
is a missing call to the token expander). 

checkout scm - that is for when it is multibranch - that will only work if 
you are running the job form a Jenkinsfile


On Saturday, March 12, 2016 at 6:56:51 AM UTC+11, Martin d'Anjou wrote:
>
> Hi Michael,
>
> I played with the plugin quite a bit. I am very enthusiastic about this 
> plugin, because it gives me a way to manage the pipeline script development 
> as if it were a regular plugin (code, test, version and release), while 
> being much easier to write than a regular plugin.
>
> I do not plan to use the mini simpleBuild DSL as is, but I plan to use its 
> base class PipelineDSLGlobal and build a different core with it. I do not 
> plan on using the Jenkinsfile aspect yet, because I have multiple CD/CI 
> pipelines per branch in my projects, and only one Jenkinsfile is supported 
> currently.
>
> One thing I was trying to do was to acess the "env" and the build 
> parameters from inside the simpleBuild Closure. I changed "env" to "map" in 
> the source (so "env" would not be hidden), and I attempted the following:
> simpleBuild {
> ...
> map = [url: "http://host/path/${PARAM}/${env.BUILD_NUMBER};]
> ...
> }
>
> I tried various ways of setting the closure delegate (see it on my github 
> fork 
> )
>  
> but the alternative I tried results in not being able to resolve the "scm" 
> in "checkout scm". If I use ${this.env.BUILD_NUMBER}, then it works, but I 
> would feel more comfortable using your code if I understood why 
> ${env.BUILD_NUMBER} cannot be resolved. The Closure owner is a 
> WorkflowScript after all, and it should have "env".
>
> Thanks,
> Martin
>
> On Wednesday, February 24, 2016 at 9:42:41 PM UTC-5, Michael Neale wrote:
>>
>> Hey I thought some may be interested in this Pipeline DSL enhancement (ie 
>> a plugin that enhances Jenkins pipeline) which is installable as a plugin: 
>> https://wiki.jenkins-ci.org/display/JENKINS/Simple+Build+For+Pipeline+Plugin 
>> - interested in thoughts/feedback (you use it where you would use a 
>> Jenkinsfile or pipeline script). 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1e3c85b1-b228-4c3b-bdf8-c7533ecbe358%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: simple build (DSL) for pipeline plugin

2016-03-11 Thread Martin d'Anjou
Hi Michael,

I played with the plugin quite a bit. I am very enthusiastic about this 
plugin, because it gives me a way to manage the pipeline script development 
as if it were a regular plugin (code, test, version and release), while 
being much easier to write than a regular plugin.

I do not plan to use the mini simpleBuild DSL as is, but I plan to use its 
base class PipelineDSLGlobal and build a different core with it. I do not 
plan on using the Jenkinsfile aspect yet, because I have multiple CD/CI 
pipelines per branch in my projects, and only one Jenkinsfile is supported 
currently.

One thing I was trying to do was to acess the "env" and the build 
parameters from inside the simpleBuild Closure. I changed "env" to "map" in 
the source (so "env" would not be hidden), and I attempted the following:
simpleBuild {
...
map = [url: "http://host/path/${PARAM}/${env.BUILD_NUMBER};]
...
}

I tried various ways of setting the closure delegate (see it on my github 
fork 
)
 
but the alternative I tried results in not being able to resolve the "scm" 
in "checkout scm". If I use ${this.env.BUILD_NUMBER}, then it works, but I 
would feel more comfortable using your code if I understood why 
${env.BUILD_NUMBER} cannot be resolved. The Closure owner is a 
WorkflowScript after all, and it should have "env".

Thanks,
Martin

On Wednesday, February 24, 2016 at 9:42:41 PM UTC-5, Michael Neale wrote:
>
> Hey I thought some may be interested in this Pipeline DSL enhancement (ie 
> a plugin that enhances Jenkins pipeline) which is installable as a plugin: 
> https://wiki.jenkins-ci.org/display/JENKINS/Simple+Build+For+Pipeline+Plugin 
> - interested in thoughts/feedback (you use it where you would use a 
> Jenkinsfile or pipeline script). 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a4b0b99e-b89f-4c9b-9bca-ec4552aca7ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


simple build (DSL) for pipeline plugin

2016-02-24 Thread Michael Neale
Hey I thought some may be interested in this Pipeline DSL enhancement (ie a 
plugin that enhances Jenkins pipeline) which is installable as a 
plugin: 
https://wiki.jenkins-ci.org/display/JENKINS/Simple+Build+For+Pipeline+Plugin 
- interested in thoughts/feedback (you use it where you would use a 
Jenkinsfile or pipeline script). 


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/63c375d2-e211-4cff-b3f2-923fb9989619%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.