问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/10275582/jenkins-skip-scm-on-parameter