June 13th, 2018
In Technology
No Comments
If you enjoy this article, see the other most popular articles
If you enjoy this article, see the other most popular articles
If you enjoy this article, see the other most popular articles
Jenkins pipelines must be built so they can run across multiple executors, even if you only run Jenkins with one executor
(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.
A bit hidden, and important for anyone using Jenkins, This fact should be better known:
Serialization and the “node” Block
Jenkins pipelines must be built so they can run across multiple executors, even if you only run Jenkins with one executor. This is done using the node block. With it, a job can be split into smaller pieces that can be scheduled to run on any executor on any agent in the cluster. Once a node block completes, Jenkins serializes the remaining variables to pass on to the next node block or to the intervening Groovy code.Theoretically, this works seamlessly and is a great feature. And it does, when all the classes used in your script are serializable.
I’ve been bitten by using non-serializable classes multiple times during pipeline script development. I’ve also had scripts start failing after a Jenkins server upgrade that forced installation of a new Java version and classes that were once serializable lost the ability to be serialized.
Post external references
- 1
https://medium.com/garbage-collection/jenkins-pipelines-what-i-wish-i-knew-starting-out-6e3d4eb2ff5b
February 8, 2022 9:33 am
From Michael S on How I recovered from Lyme Disease: I fasted for two weeks, no food, just water
"Did you have Bartonella, too? Seems it uses autogenesis..."