Zoidburg
Zoidburg

Reputation: 159

How to set number of columns for build monitor view in jenkins job DSL groovy script?

Creating Build Monitor view with DSL Script, but there is no detail onto how to set the number of columns.

Using https://jenkinsci.github.io/job-dsl-plugin/#path/buildMonitorView documents for some insight. Thinking the configure function may allow but I still have the same question of how to do it.

Assumed it may have been like list view and add a column to it but this does not work.

My current code so far:

buildMonitorView('Automation Wall') {
    description('All QA Test Suites ')
    recurse(true)
    configure()
    columns(1)
    jobs {
        regex(".*.Tests.*")
    }
}

Upvotes: 2

Views: 462

Answers (1)

snyggdual
snyggdual

Reputation: 11

buildMonitorView('Automation Wall') {
    description('All QA Test Suites ')
    recurse(true)
    configure { project ->
        (project / columns ).value = 1
    }
    jobs {
        regex(".*.Tests.*")
    }
}

Upvotes: 1

Related Questions