burden efforts to produce an alternate execution engine
(b) be limited to features which involve interacting directly with the host Jenkins
service in a way that would be impractical to simulate otherwise.
On Fri, Dec 28, 2018 at 5:49 PM martinda <martin....@gmail.com> wrote:
>> burden efforts to produce an alternate execution engine
>
> The two execution engines I know of are the scripted pipeline and the descriptive pipeline. Is there talks about a newer one?
No, that is the same execution engine—`workflow-cps` directly
implements Scripted, and Declarative is a kind of preprocessor for
that. An alternate engine would replace the on-master Groovy
interpreter.
> if you say that there are problems with returning non-simple data types, are you also saying that there are problems providing methods that return simple data types?
> e.g. jenkinsRest.api().systemApi().version() -> return the version number as a String?
The problem here is (1) using the `GlobalVariable` extension point
(please do not), (2) returning intermediate objects with behaviors.
Such idioms rely on particularities of `workflow-cps` (and do not even
work well in Declarative).
Besides not existing?
If you are limiting yourself to Scripted,
then any return values should still be simple data like primitives,
`String`s, `List`s, or `Map`s.
bitbucketClient.withServer(url: “foo://bitbucket”, project: project, repo: repo, crendentialsId: “mybitbucket”) {
def response = bitbucketClient.pullRequestApi(‘changes’, prNumber)
echo response.errors // a list
echo response.errors[0].context // a string
echo response.errors[0].message // a string
echo response.changes // a list
echo response.changes[0].path // a string
echo response.changes[0].srcPath // a string
}The response object only ever holds simple data types.
Other question: Is it okay for the step to have multiple methods, but they only return simple data types?
For example: bitbucketClient.pullRequestApi(prNumber, 'changes'); bitbucketClient.branchApi('list')
Martin
--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/285c7bae-5e53-4f69-aa6b-28f00186315a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
At a minimum, use no `GlobalVariable`s or any
other `workflow-cps` dep, and use the `Step` API as it was designed
Stapler processed this HTTP request as follows, but couldn't find the resource to consume the request
-> evaluate(<hudson.model.Hudson@4273c8a3> :hudson.model.Hudson,"/json/test")
-> evaluate(((StaplerProxy)<hudson.model.Hudson@4273c8a3>).getTarget(),"/json/test")
-> evaluate(<hudson.model.Hudson@4273c8a3>.getDynamic("json",...),"/test")
hudson.mo...@4273c8a3.getDynamic("json",...)==null. Back tracking.
-> evaluate(((StaplerFallback)<hudson.model.Hudson@4273c8a3>).getStaplerFallback(),"/json/test")
-> evaluate(<hudson.model.AllView@119d39b0[view/All/]> :hudson.model.AllView,"/json/test")
-> evaluate(<hudson.model.AllView@119d39b0[view/All/]>.getDynamic("json",...),"/test")
hudson.model.AllView@119d39b0[view/All/].getDynamic("json",...)==null. Back tracking.

--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/2204c220-3d86-4130-88fc-b7cd54d51102%40googlegroups.com.