Hi Michael,
I played with the plugin quite a bit. I am very enthusiastic about this
plugin, because it gives me a way to manage the pipeline script development
as if it were a regular plugin (code, test, version and release), while
being much easier to write than a regular plugin.
I do not plan to use the mini simpleBuild DSL as is, but I plan to use its
base class PipelineDSLGlobal and build a different core with it. I do not
plan on using the Jenkinsfile aspect yet, because I have multiple CD/CI
pipelines per branch in my projects, and only one Jenkinsfile is supported
currently.
One thing I was trying to do was to acess the "env" and the build
parameters from inside the simpleBuild Closure. I changed "env" to "map" in
the source (so "env" would not be hidden), and I attempted the following:
simpleBuild {
...
map = [url: "http://host/path/${PARAM}/${env.BUILD_NUMBER}"]
...
}
I tried various ways of setting the closure delegate (see it on my github
fork
<https://github.com/martinda/simple-build-for-pipeline-plugin/blob/feature/access-env-and-build-params/src/main/resources/dsl/simpleBuild.groovy#L45-L73>)
but the alternative I tried results in not being able to resolve the "scm"
in "checkout scm". If I use ${this.env.BUILD_NUMBER}, then it works, but I
would feel more comfortable using your code if I understood why
${env.BUILD_NUMBER} cannot be resolved. The Closure owner is a
WorkflowScript after all, and it should have "env".
Thanks,
Martin
On Wednesday, February 24, 2016 at 9:42:41 PM UTC-5, Michael Neale wrote:
>
> Hey I thought some may be interested in this Pipeline DSL enhancement (ie
> a plugin that enhances Jenkins pipeline) which is installable as a plugin:
> https://wiki.jenkins-ci.org/display/JENKINS/Simple+Build+For+Pipeline+Plugin
> - interested in thoughts/feedback (you use it where you would use a
> Jenkinsfile or pipeline script).
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" 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-users/a4b0b99e-b89f-4c9b-9bca-ec4552aca7ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.