From d248700d7edde19591bc77483ad52892674b4f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernestas=20Luko=C5=A1evi=C4=8Dius?= Date: Mon, 2 Jan 2017 22:44:14 +0200 Subject: [PATCH 1/2] Add getLog() to whitelist --- .../plugins/workflow/support/steps/build/RunWrapper.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java b/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java index 84d874a8..ee7386d3 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java @@ -161,6 +161,11 @@ public String getFullProjectName() throws AbortException { return build().getParent().getFullName(); } + @Whitelisted + public List getLog(int maxLines) throws IOException { + return build().getLog(maxLines); + } + @Whitelisted public @CheckForNull RunWrapper getPreviousBuild() throws AbortException { Run previousBuild = build().getPreviousBuild(); From 163c88abbd2bd3e17772ce96f090c3b884767b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernestas=20Luko=C5=A1evi=C4=8Dius?= Date: Sun, 26 Mar 2017 12:09:22 +0300 Subject: [PATCH 2/2] Add getLog documentation in help.html --- .../plugins/workflow/support/steps/build/RunWrapper/help.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper/help.html b/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper/help.html index 2e972ce5..03da994a 100644 --- a/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper/help.html +++ b/src/main/resources/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper/help.html @@ -3,6 +3,7 @@
result
typically SUCCESS, UNSTABLE, or FAILURE (may be null for an ongoing build)
displayName
normally #123 but sometimes set to, e.g., an SCM commit identifier
description
additional information about the build
+
log
console output of the build
id
normally number as a string
timeInMillis
time since the epoch when the build was scheduled
startTimeInMillis
time since the epoch when the build started running