Jenkins – Active Choice: CheckBox – Default values

 

When working with the Active Choice CheckBox parameter, you can select the default values by adding the ": selected" parameter

Pipeline:

properties([
  parameters([
    [$class: 'CascadeChoiceParameter', 
      choiceType: 'PT_CHECKBOX', 
      description: 'Select environment',
      filterLength: 1,
      filterable: false,
      name: 'Environment', 
      script: [
        $class: 'GroovyScript', 
        script: [
          classpath: [], 
          sandbox: false, 
          script: 
            'return[\'Development:selected\',\'Production:selected\']'
        ]
      ]
    ]
  ])
])

 

When assembling with parameters, two environments at once, "Development" and "Production" will be selected by default

0 0 vote
Article Rating

Tagged: Tags

Подписаться
Уведомление о
guest
0 Comments
Inline Feedbacks
View all comments