Skip to content

Commit

Permalink
When describing classes in a Pipeline Shared Library that have "data"…
Browse files Browse the repository at this point in the history
… they must be Serializable

Fixes JENKINS-38868
  • Loading branch information
R. Tyler Croy committed Dec 9, 2016
1 parent 4c6fcca commit 7d67519
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/doc/book/pipeline/shared-libraries.adoc
Expand Up @@ -229,7 +229,7 @@ constructor, or just one method:
[source,groovy]
----
package org.foo
class Utilities {
class Utilities implements Serializable {
def steps
Utilities(steps) {this.steps = steps}
def mvn(args) {
Expand All @@ -238,7 +238,9 @@ class Utilities {
}
----

Which would be access from Pipeline with:
When saving state on classes, such as above, the class *must* impmlement the
`Serializable` interface. This ensures that a Pipeline using the class, as seen
in the example below, can properly suspend and resume in Jenkins.

[source,groovy]
----
Expand Down

0 comments on commit 7d67519

Please sign in to comment.