Forum Discussion
rraghvani
2 years agoChampion Level 3
If you have 10 projects in a project suite, then create one build in Jenkins that will run your entire suite. Then create 10 builds for your individual projects. Once these have been set, you should not be making changes to the builds.
- ChandanD2 years agoContributor
This is too much maintenance. I want to achieve it with one build job. It should be possible.
I feel sbellary idea and solution would be best. Just need more details how to configure the build job.
- sbellary2 years agoOccasional Contributor
ChandanD This is the Jenkins Pipeline Job I created based on your scenario just an example. Hope this helps...!
pipeline {agent anyparameters {Choice(name: 'Projects',choices: ['Entier Suite','Project1', 'Project2', 'Project3'],description: 'Select the required Project.')}stages {stage('Entier Suite') {when {equals expected: "Entier Suite", actual: "${params.Projects}"}steps {script {try{downstreamJob = build job: "EntierSuiteJob", propagate: true, wait: true,parameters: [string(name: 'Parameter1', value: "${Parameter1}"),string(name: 'Parameter2', value: "${Parameter2}")]} catch (Exception e) {echo 'Exception occurred: ' + e.toString()error("Exception occurred at ${stage_name} --> " + e.toString())}}}}stage('Project1') {when {equals expected: "Project1", actual: "${params.Projects}"}steps {script {try{downstreamJob = build job: "Project1Job", propagate: true, wait: true,parameters: [string(name: 'Parameter1', value: "${Parameter1}"),string(name: 'Parameter2', value: "${Parameter2}")]} catch (Exception e) {echo 'Exception occurred: ' + e.toString()error("Exception occurred at ${stage_name} --> " + e.toString())}}}}}}
Related Content
- 12 years ago
Recent Discussions
- 6 hours ago
- 4 days ago