【问题标题】:Adding build description column to a Jenkins view using DSL使用 DSL 将构建描述列添加到 Jenkins 视图
【发布时间】:2015-10-19 10:28:38
【问题描述】:

我定义了一个相当广泛的 Job DSL 脚本,我想要一种将“构建描述”列添加到此 Job DSL 脚本生成的自定义视图的方法。有没有办法跳出配置块以编程方式添加“构建描述”列?

【问题讨论】:

    标签: jenkins dsl jobs configure


    【解决方案1】:

    不确定我的问题是否正确,但要添加说明,您需要使用以下内容:

    job('JobName') {
         ...
         listView('project-name') {
            description('here goes the description')
            ....
         }
         ...
    }
    

    如果需要在种子作业中动态提供描述,那么可以在种子作业中定义一个参数,然后将该参数的值传递给描述方法:

    /* DESCRIPTION is a build parameter supplied to this Seed job, 
       value of which to be supplied while running the 
       seed job "with parameters"    
    */
    def desc = DESCRIPTION;
    
    job('JobName') {
         ...
         listView('project-name') {
            description(desc)
            ....
         }
         ...
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-29
      • 2020-05-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多