Skip to content

Commit

Permalink
Merge pull request #495 from rtyler/pipeline-shared-libraries-seriali…
Browse files Browse the repository at this point in the history
…zable

When describing classes in a Pipeline Shared Library that have "data" they must be serializable
  • Loading branch information
R. Tyler Croy committed Dec 9, 2016
2 parents 5202284 + 7d67519 commit 5fbea09
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 5fbea09

Please sign in to comment.