Also I am not using the builder pattern, my groovy files looks like this:
package dsl
def RunGoBuild(Map gobuild_params = [:])
{
stage ('go-build-stage'){
gobuild product: "${gobuild_params.product ?: 'copytest64'}", branch:
"${gobuild_params.branch ?: 'stage'}", changeset:
"${gobuild_params.changeset ?: 'latest'}", buildType:
"${gobuild_params.buildType ?: 'beta'}"
}
}
def RunGoBuildWithLatestChange(Map gobuild_params = [:])
{
stage ('go-build-stage'){
gobuild product: "${gobuild_params.product ?: 'copytest64'}", branch:
"${gobuild_params.branch ?: 'stage'}", changeset: "latest", buildType:
"${gobuild_params.buildType ?: 'beta'}"
}
}
On Wednesday, January 3, 2018 at 10:10:53 AM UTC-8, Rijo Simon wrote:
>
> Hey Jesse,
>
> What is the reason you advice to not to package DSLs in plugins? My team
> here things it is better to package it with the plugin since that would
> allow easier distribution of the DSL extension across the various Jenkins
> instances used. What is the negative case to this?
>
> Thanks,
> Rijo
>
> On Wednesday, January 3, 2018 at 9:52:09 AM UTC-8, Jesse Glick wrote:
>>
>> On Tue, Jan 2, 2018 at 11:54 PM, Rijo Simon <[email protected]> wrote:
>> > I have a created a DSL plugin as documented at the end of this link:
>> > https://jenkins.io/blog/2016/04/21/dsl-plugins/ (Check Making it a
>> plugin).
>>
>> I would strongly advise you not to use the builder pattern
>> (`Closure.DELEGATE_FIRST` etc.) shown in that blog post and the source
>> of the error you saw. Use plain function arguments or a `Map`-valued
>> parameter.
>>
>> I would also advise you not to package DSLs in plugins. You can use
>>
>> @Library('github.com/myacct/myrepo') _
>>
>> to distribute a library directly—in which case this indeed becomes a
>> users’ list question.
>>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/3aa55fd7-a3be-4e2f-ab8b-ce754ea1a545%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.