To update or do not update repository according to some condition in Jenkins

270 Views Asked by At

I have build job with "Subversion" type of "Source Code Management".
Jenkins start update of SVN repository and then executes some build scripts.
But I do not want to update repository at once as I started this job.
I would like to run some check script and only then update repository or skip update step according to some conditions.
Is it possible to do it using some plugins or standard configuration of Jenkins?

PS.
I do not want to update repository from script manually.

1

There are 1 best solutions below

1
On

You could use a multijob https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin

Phase A: poll for changes periodically in a script.

Phase B: run your checks

phase C: run the build - including checkout.

As each job runs in its own workspace by default you could even do a SCM poll/checkout in A which would not impact the job in C