From f45b90871412f20ab0834d11c2468339fc5d1e10 Mon Sep 17 00:00:00 2001 From: Hugh Nowlan Date: Thu, 7 Jun 2018 18:29:12 +0100 Subject: [PATCH] Include documentation --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 4a4fe6f87..0c01e6da0 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,25 @@ job('downstreamJob') { } ``` +### Pipeline support + +The plugin supports use with the Jenkins pipeline plugin, but pipeline scripts that use the Comment File trigger should ensure that they stash and unstash files appropriately as stages triggered on remote nodes such as containers will be inaccessible unless explicitly transferred to master at the end of a pipeline using similar to the following: + +``` +node(myNode) { + stage('plan'){ + sh: "command > outfile.txt" + stash name: "my-stash", includes: "outfile.txt" + } +} +node("master") { + unstash "my-stash" +} + +``` + +If the job is configured appropriately, the contents of outfile.txt will be posted as a comment to the PR. + ### Updates See [CHANGELOG](CHANGELOG.md)