3

Does anyone have an idea on how to make a job skip the SCM step on command (parameter)? I want to be able to trigger the job and use the existing view (ClearCase in my case, but can be an SVN working copy) to run the build on.

The motivation for this is to save time (my ClearCase view takes about 20 minutes to prepare), since there is no change in sources.

Eldad Assis
  • 10,464
  • 11
  • 52
  • 78

1 Answers1

2

Separate your job into two: Trigger job and Worker job. Worker job does not deal with SCM and gets the root of the code tree via a parameter (the code won't live in its workspace). Trigger will poll SCM, update the local view, and call Worker via Parameterized Trigger Plugin providing it with the location of the code root.

malenkiy_scot
  • 16,415
  • 6
  • 64
  • 87
  • 1
    I already have such an implementation for some jobs, but I wanted to know if there's a plugin or internal Jenkins trick to do it. I was hoping the pre-scm-buildstep might have this capability, but found none. – Eldad Assis Apr 23 '12 at 09:06
  • I've researched this, but found no easy solution. – malenkiy_scot Apr 23 '12 at 09:09
  • are there any examples with the job dsl plugin in groovy?: https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.wrapper.MavenWrapperContext.preScmSteps – techguy2000 Feb 15 '19 at 17:49