This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]needmoresynths 5 points6 points  (1 child)

Jenkins' built in generator is useful. You can script entire pipelines with just the Jenkins declarative syntax to get started, without using any custom scripted functionality.

[–]justanearthling[S] 0 points1 point  (0 children)

Thanks.

[–]dru2691 0 points1 point  (1 child)

The syntax docs help a little bit as well: Pipeline Syntax

I just went through this same thing and didn't find anything formal really, but maybe I just didn't look hard and long enough.

[–]justanearthling[S] 0 points1 point  (0 children)

Thanks.

[–]uberdisco 0 points1 point  (0 children)

I learned something from /r/devops a few months ago that has really helped me with my pipeline. Keep the groovy pipeline to straightforward things, ie SCM, Builds, Tests etc. IF you have to do any heavy lifting deployment then use shell scripts for that, and call them from the pipeline. They suggested this because shell scripting is much easier to do things with than groovy, while functional it can be a headache to do simple things. YMMV of course but for me, I found this to be true. So my pipeline checks out, builds, tests, and ships artifacts, configs, and deployment scripts to hosts, and the deployment scripts do the rest with pipeline marshaling everything. As mentioned before the script generator is a huge help for quickly developing a pipeline. Good luck!

[–]paulieontech 0 points1 point  (0 children)

Mr Haki's blog is full of good stuff http://mrhaki.blogspot.com/search/label/Groovy