title: Can a single seed job process DSLs from multiple repos?
body: <p>I recently managed to convert several manually-created jobs to DSL scripts (inlined into temporary 'seed' jobs), and was pleasantly surprised how straightforward it was. Now I'd like to get rid of the <em>multiple</em> seed jobs and try to structure things more cleanly.</p>
  
  <p>To that end, I created a new <code>jenkins-ci</code> repo and committed all the Groovy DSL scripts to it. Then I created a <code>job-generator</code> Jenkins job that pulls from the <code>jenkins-ci</code> repo and has a single <em>Process Job DSLs</em> step. This step has the <em>Look on Filesystem</em> box ticked, with the <em>DSL Scripts</em> field set to <code>jobs/*.groovy</code>. With global push notifications already in place, this works more-or-less as intended: if I make a change to the <code>jenkins-ci</code> repo, the <code>job-generator</code> job automatically runs and regenerates all the jobs—awesome!</p>
  
  <p>What I don't like about this solution is that it has poor locality of reference: the DSL scripts for the job live in a completely separate repository from the code. What I'd <em>really</em> like is to keep the job DSL scripts in each individual code repository, in a <code>jenkins</code> subfolder, and have a <em>single</em> seed job that processes them all. That way, changes to CI setup could be code-reviewed right alongside the code. To me, that just feels like an <em>ideal</em> setup.</p>
  
  <p>Unfortunately, I don't have a clear idea about how to make this happen. If I could figure out a way to make the seed job watch multiple repos, such that a commit to any one of them would trigger it, perhaps I could inject another build step before the <em>Process Job DSLs</em> step and (somehow) script my way to victory, but... I'm unsure how to even <em>get</em> to that point. (I certainly don't want to do <em>full</em> clones of each repo in the generator job just to pull in the DSL scripts!)</p>
  
  <p>I suspect I'm not the first person to wish they could put the Job DSL scripts alongside the code, though perhaps I'm over-estimating the benefits. Any advice on this topic would be much appreciated—thanks!</p>