Reputation: 21
I'm trying to setup a build flow plugin to constantly run a job forever until you cancel the build flow.
while(true){} works, but absolutely isn't safe, as if you mess up the parameters, it'll just cause the flow to enter an endless loop and become uncancellable without a restart of Jenkins.
Is there a safe way to do something like this:
while(true){ignore(FAILURE){
build(project)
build(anotherproject)
}}
so that clicking the x button will cancel the build flow properly?
Alternately, is there a better way to build multiple projects forever from a single project, waiting for each project to complete before moving on to the next one in line and eventually looping back to the first?
Upvotes: 1
Views: 1136
Reputation: 21
Solution: If you select the Workspace checkbox just above build flow, it will actually call post build actions, where you can simply recall the project.
If you don't select the workspace button, then post build actions will not fire off.
Upvotes: 1