Michael
Michael

Reputation: 22967

Disable scheduling another build if previous one is running in Jenkins

I have a build that polls SVN and checks for changes every hour. if it finds changes it starts building.

Right now if it sees changes and a previous build (from the same job) is running, it will queue the build and start it when the previous build finishes.

Is there an option to disable the queuing of multiple builds ?

Upvotes: 4

Views: 2254

Answers (1)

malenkiy_scot
malenkiy_scot

Reputation: 16615

Here's a workaround: let one job (Trigger) do the polling and then call the main job (MainJob) that will do the updating and building. You can even use the Parameterized Trigger Plugin to pass the SVN revisions and URIs. You then check off Block build when downstream project is building in Trigger.

To propagate change-sets from Trigger to MainJob use BlameSubversion Plugin.

(BTW, here's a neat trick: Trigger does not have to check out the whole SVN tree, you can check it out by hand with --set-depth empty in the working copy of Trigger).

Upvotes: 1

Related Questions