小编Cal*_*Cal的帖子

Jenkins:动态设置参数 defaultValue

我正在尝试设置一个多分支管道配置,其中“部署”布尔复选框true在非生产分支和false生产构建中默认为。

pipeline {
  parameters{
    booleanParam(defaultValue: true, description: 'Do deploy after build', name: 'DEPLOY')
Run Code Online (Sandbox Code Playgroud)

有什么方法可以有条件地设置defaultValue=falsewhen $BRANCH_NAME == "production"

jenkins jenkins-groovy jenkins-pipeline

6
推荐指数
2
解决办法
1万
查看次数

标签 统计

jenkins ×1

jenkins-groovy ×1

jenkins-pipeline ×1