Bug Bounties

Jenkins Pipeline with Matrix Axes - Pick Axes before running job?

Using Jenkins Pipeline script and the `matrix` syntax, I can add multiple values for one axis, so multiple jobs run and can use that value to pull in an ENV file for example. However, there might be times when I only want to run the job for one or two of the axis values. I think I need to use the `extendedChoice` parameter, which will provide a list of checkboxes, but I can't find anything online about how to plug that into the `matrix` part of my pipeline script. Here is an example of what I have so far ```pipeline { agent none parameters { extendedChoice multiSelectDelimiter: ',', name: 'CLIENT', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_CHECKBOX', value: 'client1,client2,client3', visibleItemCount: 20 gitParameter branchFilter: 'origin/(.*)', defaultValue: 'develop', name: 'BRANCH', type: 'PT_BRANCH' } stages { stage('Build') { matrix { agent any axes { axis { name 'CLIENT' values 'client1', 'client2', 'client3' } } stages { stage('Running job') { steps { echo "Job running for ${CLIENT}" } } stage('Checkout') { steps { git branch: "${params.BRANCH}", url: 'git@github.com:my-username/jenkins-pipeline-test.git', credentialsId: 'Jenkins EC2' } } } } } } } ``` this script lets me pick a branch from my repo, but currently the checkbox list provided by `extendedChoice` doesn't do anything, and the job runs 3 times for each "client"