Total Akos
Total Akos

Reputation: 1

Executing multiple jenkins jobs sequentially, but continue when jobs fail or are disabled

Most people have the requirement to stop the Job queue, when one Job fails. In my case, we have a bunch of independent Jobs running daily. And some of them might be disabled. Basically, an independent job queue. I checked multiple options, to keep it simple, but I'm still stuck.

Having a main job or pipeline seems to be the best option for this.

  1. Post build action triggering multiple jobs is not sequential, but parallel. Is there maybe a way to change this default behavior to sequential, without much "deep Jenkins" knowledge? I don't wish to limit Jenkins executor count to 1, just to "enforce" sequential execution.

  2. In pipeline, I added stages: and if one job fails, it stops. Is there any parameter to change this behavior to resume, if a Job fails or is disabled?

pipeline { agent any

stages {
    stage('First job') {
        steps {
            build job: 'First job', wait: true
        }
    }
     stage('Second job') {
        steps {
            build job: 'Second job', wait: true
        }
    }
}

}

  1. If possible, I don't wish to use "Parameterized Trigger Plugin", to keep things simple. But I'm open to it.

Any suggestions?

Upvotes: 0

Views: 60

Answers (0)

Related Questions