Issue
Is it possible to have Jenkins retrieve the code from SCM (Subversion in my case) periodically and all the jobs using this updated code instead of re-polling themselves every time they run ?
Thank you
Solution
Here's one way to achieve it:
Lets say you have 4 jobs: A,B,C,D.
Job A's configuration:
Source Code Management
configured with SVN repo details.Build Triggers
set asPoll SCM
.Post-build Actions
configured to build jobs B,C,D.
Jobs B,C,D configuration:
Source Code Management
set asNone
.- No
Build Triggers
set. - Code from job A's workspace is used in the build steps.
Here job A periodically polls SCM for changes. When changes are detected, it pulls latest code from SCM and builds. Post build, it triggers jobs B,C,D.
Since jobs B,C,D are configured to use code from job A's workspace, they use the same code that was recently pulled by job A.
Answered By - Arun Kumar B
Answer Checked By - David Goodson (JavaFixing Volunteer)