Re: Calling a DSL extension resulting in error

2018-01-05 Thread Daniel Beck
> On 5. Jan 2018, at 22:01, Rijo Simon wrote: > > On adding node block I get the error: java.lang.NoSuchMethodError: No such > DSL method 'node' found among steps Per https://jenkins.io/doc/pipeline/steps/ the 'node' step is provided by the 'Pipeline: Nodes and Processes'

Re: Calling a DSL extension resulting in error

2018-01-05 Thread Rijo Simon
This is my pipeline script: node{ step ([$class: 'GoBuildSandboxBuilder', product: 'gobuild_tiny_target', branch: 'main', changeset: 'False']) } On Friday, January 5, 2018 at 1:01:16 PM UTC-8, Rijo Simon wrote: > > On adding node block I get the error: java.lang.NoSuchMethodError: No > such

Re: Calling a DSL extension resulting in error

2018-01-05 Thread Rijo Simon
On adding node block I get the error: java.lang.NoSuchMethodError: No such DSL method 'node' found among steps On Friday, January 5, 2018 at 12:37:30 PM UTC-8, Jesse Glick wrote: > > On Fri, Jan 5, 2018 at 3:30 PM, Rijo Simon > wrote: > >

Re: Calling a DSL extension resulting in error

2018-01-05 Thread Jesse Glick
On Fri, Jan 5, 2018 at 3:30 PM, Rijo Simon wrote: > org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: > Required context class hudson.FilePath is missing `step` may only be called inside `node`. -- You received this message because you are subscribed to

Re: Calling a DSL extension resulting in error

2018-01-05 Thread Rijo Simon
After install workflow-basic-steps, I get the following stacktrace: [Pipeline] stage[Pipeline] { (gobuild-stage)[Pipeline] stepRequired context class hudson.FilePath is missing[Pipeline] }[Pipeline] // stage[Pipeline] End of

Re: Calling a DSL extension resulting in error

2018-01-05 Thread Jesse Glick
On Fri, Jan 5, 2018 at 2:36 PM, Rijo Simon wrote: > java.lang.NoSuchMethodError: No such DSL method 'step' found among steps Install the `workflow-basic-steps` plugin. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.

Re: Calling a DSL extension resulting in error

2018-01-05 Thread Rijo Simon
Hey Daniel, Thanks for pointing it out. Again some of my queries here are based out of nube status developing a jenkins plugin. Or even writing pipeline script. So here it goes. So I read how ForgetBuilder was defined in the pipeline integration documentation below, and then I first tried what

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Daniel Beck
> On 3. Jan 2018, at 22:37, Rijo Simon wrote: > > so that this BuildStep plugin can be called from a pipeline script. Please > guide me on how to achieve this. https://jenkins.io/doc/developer/plugin-development/pipeline-integration/ should have everything you need. --

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Rijo Simon
ok so I think I was wrong in using gobuild method within the groovy file, but I still think this issue is relevant to Jenkins developer group. This plugin I am developing basically calls and maintains some command line instructions that is implemented as a class that extends to Builder and

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Jesse Glick
On Wed, Jan 3, 2018 at 1:12 PM, Rijo Simon wrote: >gobuild product: "${gobuild_params.product ?: 'copytest64'}", branch: > "${gobuild_params.branch ?: 'stage'}", changeset: > "${gobuild_params.changeset ?: 'latest'}", buildType: > "${gobuild_params.buildType ?: 'beta'}"

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Jesse Glick
On Wed, Jan 3, 2018 at 1:10 PM, Rijo Simon wrote: > What is the reason you advice to not to package DSLs in plugins? Because you can already share libraries across instances, much more easily, and without drawbacks such as forcing a single version of the library upon every

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Rijo Simon
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:

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Rijo Simon
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

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Jesse Glick
On Tue, Jan 2, 2018 at 11:54 PM, Rijo Simon 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

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Stephen Connolly
The "I have a created a DSL plugin" at the start of the mail is the hint I am looking at... now it may be a script approval issue, but that may actually instead point to a question as to how to annotate a newly developed extension to mark the script safe methods... or it may be plain script

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Victor Martinez
Sorry if I misunderstood this question, but I though that particular stacktrace was related to the usage of the script approval process. Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Stephen Connolly
On Wed 3 Jan 2018 at 08:24, Victor Martinez wrote: > Please ask to the jenkinsci-users mailing list: > https://jenkins.io/mailing-lists/ > The poster is *clearly* asking a question about plugin development. This is the correct list for that. The users list is

Re: Calling a DSL extension resulting in error

2018-01-03 Thread Victor Martinez
Please ask to the jenkinsci-users mailing list: https://jenkins.io/mailing-lists/ -- 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

Calling a DSL extension resulting in error

2018-01-02 Thread Rijo Simon
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 however get the following error when I call the DSL command: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not