简体   繁体   中英

Groovy 3 and Jenkins Embedded Scripting?

I've just started playing around with Jenkins - and I'm looking at Pipelines.

I'm looking to brush-up on my Groovy skills to facilitate this.

The latest literature is all "Groovy 3" based and comes with some significant new features, but despite having the latest Jenkins install (Jenkins 2.249.2), the embedded scripting engine seems to be older - from Jenkins' script console on my master:

println GroovySystem.version

Gives 2.4.12.

My question - Is the version of Groovy easily/sensibly configurable in Jenkins or is it usual to stick with whatever ships with Jenkins?

You must choose system groovy if you want ready access to the Jenkins internals, jobs, etc. See Groovy Script vs System Groovy Script , and Known limitations ; you get what is packaged.

If you use external groovy and don't need to access Jenkins internals, your choice. Lots of internal debate on upgrading as it's lots of work. You can follow JENKINS-51823 and Pipeline Groovy Epic

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM