Using configure closure to build yet-unsupported view types?

107 views
Skip to first unread message

jonny sywulak

unread,
Apr 28, 2014, 2:44:31 PM4/28/14
to job-dsl...@googlegroups.com
Hi there--

I'm trying to convert our views to use the DSL plugin, but we're using a plugin view that isn't supported yet (the delivery pipeline plugin: https://wiki.jenkins-ci.org/display/JENKINS/Delivery+Pipeline+Plugin). I tried messing around to see if I could get a configure block to generate it, but it doesn't seem like that's possible since the dsl takes in a type and uses that to generate the root XML element.

Am I missing something silly or is it not possible to use the DSL plugin to generate views for unsupported view types?

Thanks!!

.j.

Daniel Spilker

unread,
Apr 29, 2014, 3:56:09 AM4/29/14
to job-dsl...@googlegroups.com
Hi,

you can change the type of root element in a configure block:

view {
  name 'foo'
  configure { view ->
    view.name = 'se.diabol.jenkins.pipeline.DeliveryPipelineView'
    ...
  }
}

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/c3efa541-c69a-4bec-929f-3e9032a23cc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

    daniel spilker

    ma...@daniel-spilker.com
    +49.179.1093202
    geschwister-scholl-straße 62, 20251 hamburg
    http://daniel-spilker.com

jonny sywulak

unread,
Apr 29, 2014, 7:52:28 PM4/29/14
to job-dsl...@googlegroups.com
This worked perfectly! Thank you so much!!

.j.


--
You received this message because you are subscribed to a topic in the Google Groups "job-dsl-plugin" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/job-dsl-plugin/QoJkmiG804k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to job-dsl-plugi...@googlegroups.com.

To post to this group, send email to job-dsl...@googlegroups.com.

Torsten Reinhard

unread,
Jan 8, 2016, 4:02:59 AM1/8/16
to job-dsl-plugin
Hi,

is that still the recommended way? I need to generate an "Environment Dashboard View" (https://wiki.jenkins-ci.org/display/JENKINS/Environment+dashboard+plugin)
Currently I implemented it this way:

listView("ENV-Dashboard") {
 
    configure
{ view ->
      view
.name = 'org.jenkinsci.plugins.environmentdashboard.EnvDashboardView'
      view
/ envOrder
      view
/ compOrder
      view
/ deployHistory (10)
   
}
}


but using "listView" DSL-command first looks somehow strange for me...

thanx for any ideas, maybe official support for that plugin ?

Regards, Torsten
Reply all
Reply to author
Forward
0 new messages