Forum Discussion
- sbellaryOccasional Contributor
You need to create a Master Job with dropdown list for entire Suite and all the different projects you need. So that you can run whichever project you need. And this can be more easily created with Jenkins Pipeline.
- ChandanDContributor
I have option to configure the build job. Could you explain which option to be selected to make it working.
I liked your idea.
- rraghvaniChampion Level 3
If I understand correctly, you want to pass in a parameter as a project name to be executed via Jenkins?
If yes, then I suggest you see and use TestComplete Command Line
- ChandanDContributor
I want to execute entire project suite from Project parameter of Jenkins
- rraghvaniChampion Level 3
Select this option then,
I don't quite understand the need for the parameter you want to use.
- ChandanDContributor
I know this option. With this it is working.
But I want both Project test and Entire suite via Project test only.
- sbellaryOccasional Contributor
Looks like you are using "Freestyle Project" but I suggest using "Pipeline Project" gives more options and easier to work. But you can still do with your job too there is an option called "Entire Suite" select it and pass the value.
- ChandanDContributor
Could you explain me in detailed way how do I achieve both from Entire Suite option. With screenshot
- rraghvaniChampion Level 3
You have the option to run the entire suite or an individual project within a suite.
What's the difference between "I want to execute entire project suite from Project parameter of Jenkins" and selecting Entire Suite?
- ChandanDContributor
So no option to run entire project suite via Project?
It is either entire Project suite or Individual Project only?
- rraghvaniChampion Level 3
Yes.
I do not understand why you want to use a parameter to run the entire suite!? When you can select the option "Entire Suite" 😕
- ChandanDContributor
The reason been - If developer makes changes in specific project then execution could be individual project and result would be in 10-15 min.
If entire suite is executed then to get results it takes 1 hour as I have many projects.
I don't want to change the configuration every time.
For final release execution of entire suite is best option.
So, with Project I wish both.
I hope you understood my pain.
- rraghvaniChampion 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.
- sbellaryOccasional 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())}}}}}}
- rraghvaniChampion Level 3
Actually, ignore what I have mentioned previously.
I think you can use something like https://plugins.jenkins.io/editable-choice/ in your pipeline to select the options you require. May be sbellary can assist you on this?
Related Content
- 12 years ago
Recent Discussions
- 6 hours ago
- 4 days ago