Jenkins Active Choice Parameter插件 Active Choice plug-in会生成三种参数类型: 1,Active Choices Parameter(主动选择参数) Active Choices参数使用Groovy脚本或Scriptler目录中的脚本动态生成构建参数的值选项列表。2,Active Choices Reactive Parameter(主动选择反应参数) 根据主动选择参数的选项而提供不同的对应值或者列表...
Jenkinsfile 复制 properties([parameters([[$class:'ChoiceParameter',choiceType:'PT_SINGLE_SELECT',description:'Select the Env Name from the Dropdown List',filterLength: 1,filterable:true,name:'Env',randomName:'choice-parameter-5631314439613978',script: [$class:'GroovyScript',fallbackScript: [class...
Jenkinsfile代码 代码语言:javascript 复制 properties([ parameters([ [$class: 'ChoiceParameter', choiceType: 'PT_SINGLE_SELECT', description: 'Select the Env Name from the Dropdown List', filterLength: 1, filterable: true, name: 'Env', randomName: 'choice-parameter-5631314439613978', script: ...
在使用Pipeline项目时 一般都是参数化构建工作,在Jenkins的构建需要使用参数类型有复选框,单选按钮,多选值等输入的情景。 转到→管理Jenkins→选择管理插件→选择可用选项卡,然后搜索主动选择插件。安装并重新启动Jenkins,以正确安装插件。我的已经安装好,因此在“已安装”标签中列出。 主动选择参数 使用Groovy脚本或Scri...
Jenkinsfile的environment 可以通过以下方法根据环境变量,设置另一个环境变量的值。 DEPLOY_CONFIG = """${sh( returnStdout: true, script: 'if [ "${BUILD_ENV}" = "正式环境" ] ; then echo "ALIYUN_FORMAL"; else echo "ALIYUN_TEST"; fi' ...
Groovy Script调用python脚本返回值,方法如下: 添加Extended Choice Parameter参数 pp01,逗号分隔,items数量可多不可少: 1.编写Python脚本test.py,内容如下: #!/usr/bin/env python3 #coding=utf-8
Jenkinsfile-Active Choices参数 Jenkinsfile代码
Active Choices Parameter: Configuration Options (Example 01) An Active Choices Parameter is configured by setting the following options in the parameter configuration The 'Name' and 'Description' These are the typical parameter Name and Description that are common to all Jenkins parameters ...
要设置这个参数,我们可以在Jenkinsfile中写这样的东西。
要设置这个参数,我们可以在Jenkinsfile中写这样的东西。