Jenkins Declarative Pipeline with extended choice parameter

后端 未结 2 696
不思量自难忘°
不思量自难忘° 2021-02-15 14:54

I tried out to implement my first Declarative Pipeline with Jenkins to be able to put also the parameter definitions of a job under SCM.

I wanted to transfer an existing

相关标签:
2条回答
  • 2021-02-15 15:42

    This is what i used and Tested sucessfully for Single parameter you might need to convert it for Json

    com.cwctravel.hudson.plugins.extended_choice_parameter.ExtendedChoiceParameterDefinition extch =new com.cwctravel.hudson.plugins.extended_choice_parameter.ExtendedChoiceParameterDefinition( "NAME", "PT_SINGLE_SELECT", "VALUE, a, b", null, null, null, null, null,null, null,null,null, null, null, null,null, null, null,null, null, null, null, null, null, null,null,false,false,2,"DESC", "," )
    
    0 讨论(0)
  • 2021-02-15 15:56

    You should go to your http://jenkins-url.com/pipeline-syntax on the Sample step dropdown select properties There is a checkbox for This project is parameterized then you can select Add parameter Extended Choice Parameter and you can generate the groovy for that for your pipeline.

    0 讨论(0)
提交回复
热议问题