jenkinsjenkins-pluginsjenkins-scriptlerjenkins-job-dsl

Continuous Execution in Jenkins


How to execute the same build again and again in Jenkins(Say I want to execute the build for 10 times continuously). After each execution the reports have to copied.

Don't say create 10 jobs and make use of Downstream/Upstream.


Solution

  • We do this with this Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin

    With this plugin "Build Flow Plugin" you can create a new job type in Jenkins called "Build Flow" which allows you to control a build pipeline aka flow by groovy script:

    for ( n in 0..30 ) {
            build("Your Jenkins Job", SampleParameter: "Value")
    }
    

    This will run the Jenkins Job "Your Jenkins Job" 30 times.