Jenkins Job Builder vs. "Jenkins 2.0 Pipeline as Code"

1,624 views
Skip to first unread message

David M. Karr

unread,
May 6, 2016, 2:07:44 PM5/6/16
to jenkins...@googlegroups.com
I work in an OpenStack-related community that uses "Jenkins Job Builder"
to build Jenkins jobs. I don't know a lot about it, but I did manage,
with a lot of help from our infra team, to make the changes required to
build the new project I was adding.

I'm also pretty familiar with Groovy, although I haven't done much with
Groovy in Jenkins besides viewing several presentations on how it works.

I'm really interested in any factual comparisons of JJB with this
"Pipeline as Code" concept in Jenkins 2.0. Seeing some of the other
schisms between the communities I work in, I imagine there aren't too
many people who intimately understand both sides of this, but I'd
appreciate if anyone has any detailed examination of this.

One particular thing that I wonder about, how "testable" or "verifiable"
are scripts using this "new" paradigm, compared to what a production JJB
script would look like? I sometimes hear about JJB scripts that fail at
runtime because there were details that couldn't be verified on the
desktop. Does "Pipeline as Code" deal with this at all?

Baptiste Mathus

unread,
May 7, 2016, 9:28:05 AM5/7/16
to jenkins...@googlegroups.com

Hi,
Not absolutely sure, but from what I seem to understand, JJB doesn't actually compare with Pipeline, but with Job DSL.

Pipeline /just/ defines a way to express what a build should do. In an independent fashion of how it was done before (I.e. nothing coming from Freestyle jobs). Using a "scripting" way. Durable and so on.

JJB and Job DSL can help version and generate jobs, using templates an so on. But in the end you will generate freestyle jobs, etc. or even pipeline ones with them.

(Please note I never used JJB so I may have misunderstood his role).

Cheers



--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/572CDD63.7010104%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Wayne Warren

unread,
May 10, 2016, 12:32:41 AM5/10/16
to Jenkins Users

I can't speak about Pipeline at all since I have not used it.

As for JJB, I can speak about that because I both use it and I am one of its core developers. As for "JJB scripts that fail at runtime" I might be misunderstanding but I think you are referring to the possibility that running JJB in "test" mode (dumping generated Job configuration XML to STDOUT in your local terminal) can produce different XML than what is produced when running in "update" mode (updating actual job configuration on a running Jenkins instance by POSTing to the job's HTTP API endpoint).

This can happen, for example, when you run JJB in test mode without telling it which Jenkins instance it would be sending its generated XML to. The reason for this is that we have built in support in Jenkins Job Builder for checking which plugins and their versions are installed on a particular Jenkins instance. (Specifically, the one specified in the jenkins section of your JJB configuration file)
Reply all
Reply to author
Forward
0 new messages