It would be a nice feature :)

My approach is to generate the build flow jobs via the Gary Hale's 
gradle-jenkins plugin. Everything is then stored in source control and the 
jobs generated by runnign a gradle script.

HTH.

On Monday, 7 April 2014 08:13:29 UTC+1, asmundo wrote:
>
> hi all,
>
> I want to thank Jenkins community for a this excellent tool. 
>
> To make my work even easier I would very much like to be able to do 
> regression testing on my build flow scripts. See [1] for motivation. If 
> anybody have solved this already I would very much like to know the 
> solution. 
>  
> My suggestion to solve this is to read the build flow definition from file 
> and not directly from a job definition. File path should be passed in as a 
> parameter. Inspired by [2] and [3] my first try was:
>
> String fileContents = new File('/tmp/flow.txt').text
> println fileContents
>
> buildClosures = []
> curClosure = { fileContents }
> buildClosures.add(curClosure)
>
> parallel(buildClosures)
>
>
> Output: 
>
> Started by user anonymous <http://localhost:8080/user/null>
> build("pass")
>
> parallel {
> }
> Finished: SUCCESS
>
>
>
> I admit I did not doubted this would work but I had to try.  If anybody 
> have an idea on how to do this inside a build flow definition or from a 
> groovy script. 
>
> I am expect an answer to this in the build flow plugin code but my 
> java/groovy knowledge is limited. A pointer where the reading of the build 
> job definition is done would be much appreciated. 
>
>
> Regards,
> Asmund
>
> [1] 
>
> Motivation: 
> My 100+ jobs are with many dependencies are getting easy to mess up under 
> reconfiguration, mostly checkin regression jobs. I have most of my jobs in 
> freestyle configurations and the dependencies handled by the Build flow 
> plugin. The freestyle jobs are mostly just executing a script, and is 
> therefore easy to checkin regression on. But the build flow scripts the 
> issue I now have.   
>
> [2] https://groups.google.com/forum/#!topic/jenkinsci-users/dkwOzMVeYxg
> [3] 
> http://stackoverflow.com/questions/7729302/how-to-read-a-file-in-groovy-into-a-string
>  

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to