badbuda
badbuda

Reputation: 93

triggering builds of several items at once

I have several items in Jenkins and I'd like to trigger a build in each one of them, once I hit build in a different item. I'd like it to happen in parallel.

meaning - today I have item x, item y, item z. when I want to run them all together, I have to open a different tab for each one, and then hit the build button in each one, at once. now I'd like to have a different item, that when I hit the build button, it will trigger the builds in all of my items, and the builds of all the items will run simultaneously.

how can I do that?

Upvotes: 0

Views: 79

Answers (1)

Samit Kumar Patel
Samit Kumar Patel

Reputation: 2098

Yes from one Job you can trigger all other Jenkins jobs. More details can be found in this Jenkins Documentation

Suppose you have item-x, item-y, item-z and trigger-all jobs in Jenkins and your goal is it triggers all the job when trigger-all is build.

trigger-all Jenkinsfile will look like this

node {

  stage('trigger-all') {
     build job:"item-x",parameters : [], wait: false
     build job:"item-y",parameters : [], wait: false
     build job:"item-z",parameters : [], wait: false
  }
}

Upvotes: 2

Related Questions