Gerrit Trigger + Pipeline Jobs question

414 views
Skip to first unread message

Jacob Scott

unread,
May 27, 2016, 1:45:08 PM5/27/16
to jenkins...@googlegroups.com
Hi,

I've been using Gerrit Trigger + Jenkins 1.6 for a fairly vanilla pre merge unit test setup. I've recently upgraded to Jenkins 2.1 and want to upgrade my job for improved functionality -- I think using pipeline jobs -- but I haven't written any pipeline jobs yet and am not quite sure where to start. The Gerrit Trigger wiki page (https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger) mentions pipeline jobs but I think I'm too new to pipeline jobs to understand the writeup.

Currently, I have a single job which is Gerrit Triggered on Patchset creation and does a build and runs unit tests & verifies/etc.

I would like to augment this such that I have a initial job which is Gerrit Triggered on Patchset creation, introspects the commit (e.g., to determine whether modifies javascript files, python files, or both), and based on the results of that introspection, triggers one of a few possible downstream jobs (e.g. "build + unit tests", "build + unit tests + end to end tests", etc). 

I want these downstream builds to verify back to gerrit -- and I'm not sure how to configure these downstream jobs or inject the right context/env vars/etc so that behave basically as if they were vanilla "Gerrit Trigger on Patchset creation" jobs even though they are actually being triggered by the upstream "dispatch" job.

I would appreciate any suggestions, examples, pointers to resources, etc.

Thanks!
Reply all
Reply to author
Forward
0 new messages