New Pipeline plugin: Pipeline Model Definition

109 views
Skip to first unread message

Andrew Bayer

unread,
Aug 30, 2016, 1:33:18 PM8/30/16
to jenkin...@googlegroups.com, jenkins...@googlegroups.com
Hey all -

I've released a first preliminary version (0.1) of a new plugin, Pipeline: Model Definition. It's intended to provide a more config-like/declarative way to define Pipelines, with features like better syntactic/semantic error messages, an easy way to specify notifications or post-build actions to run regardless of build status, and more. 

It's still very early on - this is basically an MVP, so I wouldn't recommend using it in production yet, but I intend to keep backwards compatibility working as we go forward. You can find the repo at https://github.com/jenkinsci/pipeline-model-definition-plugin, with early docs at https://github.com/jenkinsci/pipeline-model-definition-plugin/wiki and a spec for the model syntax at https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/master/SYNTAX.md - I'd love feedback! Thanks!

A.

Gavin Mogan

unread,
Aug 31, 2016, 2:55:17 AM8/31/16
to Jenkins Developers
I'm kinda confused what this is. Is this just a bunch of samples?

Is it new syntax? Why would I want to use this instead of normal pipelines?

Andrew Bayer

unread,
Aug 31, 2016, 2:42:02 PM8/31/16
to jenkin...@googlegroups.com
I'm not great at explaining in an intro email. =)

It's a new syntax, yes. The intent is to be something closer to a "config" feel and fit more into how people are used to Freestyle jobs working - a more structured form with some default assumptions (like that you'd probably want to send notifications at the end of the build without needing to wrap everything in a "catchError" or try/catch). This is just an early version - we'll be adding more functionality, and that functionality will continue to be Pipeline steps with syntactic sugar/declarative nature to help make it easier to get started while still giving you the ability to easily move to traditional Pipeline script syntax.

As I mentioned, we're also doing some nifty stuff, in my opinion, for validation of the syntax and semantics, either at runtime or against a Jenkinsfile without even running it (as of next release, there'll be a shell script you can download that'll take a Jenkins URL and the path to a Jenkinsfile and proceed to "lint" the Jenkinsfile against that Jenkins master!) - so less mystifying compilation errors, syntactic/semantic errors will be reported at the very beginning of the build (all of them throughout the Jenkinsfile, not just when they're encountered during the build), etc... Just trying to polish the experience. =)

Down the road, a big part of Pipeline Model Definition syntax is that there'll be a visual editor for it as part of Blue Ocean - that's still a ways out, but we've been designing the model around that goal from the very beginning, so we can translate the model syntax into a JSON representation and vice versa. I'm curious to see if anyone else ends up building other things on top of that functionality. =) 

Pipeline Model 0.1 was released yesterday, as I said, and it'll be bundled in the upcoming Blue Ocean beta.

A.

On Tue, Aug 30, 2016 at 11:55 PM, Gavin Mogan <ga...@gavinmogan.com> wrote:
I'm kinda confused what this is. Is this just a bunch of samples?

 Is it new syntax? Why would I want to use this instead of normal pipelines?

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5c478a5c-e145-442d-9c51-dc27bfdbcbeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Bayer

unread,
Aug 31, 2016, 2:45:08 PM8/31/16
to jenkin...@googlegroups.com, jenkins...@googlegroups.com
Oh, and I'll be presenting on this at Jenkins World on Thursday the 15th in the afternoon, with a demo during lunch time, and will be around to chat all week. =)

A.

Andrew Bayer

unread,
Oct 8, 2016, 3:38:13 AM10/8/16
to jenkins...@googlegroups.com, jenkin...@googlegroups.com
It's *definitely* not supposed to do that! The declarative model should only kick in if you're using the "pipeline { ... }" step. Can you open a ticket on issues.jenkins-ci.org with the errors you're getting? Thanks!

A.

On Saturday, October 8, 2016, Matthew Grose <grose.m...@gmail.com> wrote:
Apologies if this isn't the right forum.. after installing BlueOcean beta this plugin came in as dependency. It appears it tries to now run all of our existing jenkinsfile pipelines under the model definition. Was able to remove blue ocean and the model definition plugin and the existing jenkinsfile's starting working again.  It appears the installation of the plugin force adopts all jenkinsfile's to use configuration over code, is this expected? is there a way to differentiate between the two options for certain jenkinsfiles?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b652a1bf-e601-4bbc-b7bd-832aea508af1%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages