Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 881
Phil Avatar asked Nov 07 '25 11:11

Phil


1 Answers

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

like image 195
Ian W Avatar answered Nov 09 '25 09:11

Ian W



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!