Using Job DSL for a multi Maven project CI and CD setup

40 views
Skip to first unread message

Steve Richards

unread,
Jan 14, 2016, 9:24:28 AM1/14/16
to job-dsl-plugin
Hi,

First post on the group so apologies if this is not the right place but had to start somewhere!

I want to use the Job DSL plugin for a multi Maven project application where each Maven project has its own GIT repository. Now, I know one answer that may be returned is why have multiple GIT repos and multiple projects. For now, restructuring the application is not an option but will be in the future. My focus is on quickly implementing a decent CI/CD process and using Jenkins to do this.

So, my question is how do you implement 1) a CI process using the Job DSL plugin for multiple projects and 2) how do you bring this all together to form a CD pipeline for the application?

My initial thoughts are that each Maven project should have a Seed job and its own DSL for the build and unit test part. This would monitor the non-master branches and would suit the CI part of the equation. Next we would have a single seed job and DSL that monitors the master branches for all 4 projects which would then build, unit test, integration test etc and also deploy into various environments for other testing and deployment activities. Is this the best approach?

If I use the above approach then the non-master branches may not be fully tested and deployed before merging back into master - is there a way of creating a sudo master pipeline that the non-master branches can use so we actually prove a lot of full CD pipeline on the non-master branch? If yes, what is the best way to create this and how does it get triggered i.e. for every commit or is there a way to trigger only on specific commits?

Not sure if all of the above can be answered in this group but any help would be greatly appreciated.

Many Thanks,

Steve

Patrick van Dissel

unread,
Jan 14, 2016, 9:48:12 AM1/14/16
to job-dsl...@googlegroups.com
Hey Steve,

multiple git repos +1 :D
{offtopic}
Don't turn it into a big app, make it multiple services instead. :D
{/offtopic}

I've done a talk on this a while back, you can find it, and all its
working jobdsl demo code at:
- https://github.com/pvdissel/talk-jenkins-jobdsl
- slides + recording:

http://www.slideshare.net/pvdissel/2014-1104j-fall-cultivating-the-jenkins-job-jungle-with-groovy

I think one of the demo cases is exactly what you're describing.

Hope it's useful to you :)

/Patrick
> --
> You received this message because you are subscribed to the Google
> Groups "job-dsl-plugin" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to job-dsl-plugi...@googlegroups.com
> <mailto:job-dsl-plugi...@googlegroups.com>.
> To post to this group, send email to job-dsl...@googlegroups.com
> <mailto:job-dsl...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/job-dsl-plugin/5629fa49-c209-4998-9b9d-3cf150a23aba%40googlegroups.com
> <https://groups.google.com/d/msgid/job-dsl-plugin/5629fa49-c209-4998-9b9d-3cf150a23aba%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Steve Richards

unread,
Jan 14, 2016, 1:39:25 PM1/14/16
to job-dsl-plugin
Thanks Patrick.

Will take a look at the slides, video's and demo projects. I may have some questions after reading through everything if that is ok.

Steve
Reply all
Reply to author
Forward
0 new messages