Reuse parts of the DSL code?

47 views
Skip to first unread message

thomas....@teamaol.com

unread,
Jan 13, 2017, 8:46:29 AM1/13/17
to job-dsl-plugin
Is it possible somehow (example?) to extract part of the pipeline code
into a separate function?

Example: I'm generating the build parameters dynamically.
The code for it will be same for multiple job types.

I tried to extract that part "parameters{ .... }" into a function but
that doesn't work. I get then something like this:

13:36:49 ERROR: (creator.groovy, line 159) No signature of method: creator.parameters() is applicable for argument types: (creator$_handleBuildParameters_closure1) values: [creator$_handleBuildParameters_closure1@110e75c7]

Any ideas?

Kind regards,
Thomas

Andrew McLaughlin

unread,
Jan 13, 2017, 1:49:56 PM1/13/17
to job-dsl...@googlegroups.com
Seems like I saw someone else address this last year some time. Don’t remember if they solved it. Maybe they’ll chime in…

Andrew


--
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/d53c8cff-bdf7-4a58-b610-d6ab86795829%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages