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(); 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