Skip to content

Instantly share code, notes, and snippets.

@paul-uz
Created November 22, 2023 15:01
Show Gist options
  • Save paul-uz/9e4ecdc03faf4d36bf50fc85d75514a7 to your computer and use it in GitHub Desktop.
Save paul-uz/9e4ecdc03faf4d36bf50fc85d75514a7 to your computer and use it in GitHub Desktop.
Jenkins Pipeline
pipeline {
agent any
parameters {
extendedChoice multiSelectDelimiter: ',', name: 'SELECTED_CLIENT', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_CHECKBOX', value: 'client1,client2,client3', visibleItemCount: 20
}
stages {
stage('Build') {
matrix {
agent any
axes {
axis {
name 'CLIENT'
values 'client1', 'client2', 'client3'
}
}
stages {
stage('Running job') {
when {
expression { params.SELECTED_CLIENT != CLIENT }
}
steps {
echo "Job running for ${CLIENT}"
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment