ListView is recreated entirely, but all I want is just to add a job.

303 views
Skip to first unread message

Vicki Kozel

unread,
Jun 23, 2016, 3:37:51 PM6/23/16
to job-dsl-plugin
According to Job DSL docs the code below either creates or updates a view. In my case though it recreates the view every time i run it. I need to add a new jobs to the view, not recreate the view. Is this possible with Job DSL?

listView('example') {
    
    filterBuildQueue()
    filterExecutors()
    jobs {
        name("Deploy_${PLAYBOOK_NAME}")
        regex()
        
    }
    
    columns {
        status()
        weather()
        name()
        lastSuccess()
        lastFailure()
        lastDuration()
        buildButton()
    }
}

Rob Fagen

unread,
Jun 24, 2016, 11:56:19 AM6/24/16
to job-dsl-plugin
I know it's not an answer to your question, but is there a specific reason you're running into for not re-creating the view? It should have the same URL and behavior and only update the contents of the view based on the regex.

PS. Should I ask you to say 'hi' to Igor for me? :)

Rob

Vicki Kozel

unread,
Jun 24, 2016, 1:19:52 PM6/24/16
to job-dsl-plugin
Hi Rob! Nice to hear from you! Hope all is well. Will definitely say hi to Igor. The deal with the views is that I am trying to add jobs that I create dynamically to an already existing view. Now, what happens when I use the posted job-dsl is that the new view overrides the old one. I am not sure if this is a bug or an intended behavior in job-dsl. The way the syntax looks in the example -  the view is being instantiated all anew, so I am not surprised to see the override. It's just that the doc for this example says "create or update" the view. I can certainly use system groovy or jenkins CLI to manipulate the view, but I really wanted to give a job-dsl a try, and it does work beautifully creating the jobs. 

Daniel Spilker

unread,
Jun 27, 2016, 3:44:06 AM6/27/16
to job-dsl...@googlegroups.com
Hi,

the behavior for jobs and views is the same, they are created or updated entirely. Partial updates are not possible.

Daniel


--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/4968b3b2-7195-4e7b-aadb-d97f960e0cfb%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages