Class RunWrapper
java.lang.Object
org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper
- All Implemented Interfaces:
Serializable
Allows
Whitelisted access to selected attributes of a Run without requiring Jenkins API imports.
See the help for currentBuild in snippet-generator's globals list for
details on these fields.
NOTE: if modifying this class, please remember to manually update Runwrapper/help.html- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.sf.json.JSONArraynet.sf.json.JSONArraygetBuildCauses(String className) Filters the returned list by the type ofCauseclass passed as input ex.Get environment variables defined in the build.List<ChangeLogSet<? extends ChangeLogSet.Entry>> longgetId()intRun<?, ?> Raw access to the internal build object.longlongbooleanbooleanresultIsBetterOrEqualTo(String other) booleanresultIsWorseOrEqualTo(String other) voidvoidvoidsetKeepLog(boolean b) void
-
Constructor Details
-
RunWrapper
-
-
Method Details
-
getRawBuild
Raw access to the internal build object. Intentionally notWhitelisted. The result is also not cached, since we want to stop allowing access to a build after it has been deleted. -
setResult
- Throws:
AbortException
-
setDescription
- Throws:
IOException
-
setDisplayName
- Throws:
IOException
-
setKeepLog
- Throws:
IOException
-
getNumber
- Throws:
AbortException
-
getBuildCauses
- Throws:
IOExceptionClassNotFoundException
-
getBuildCauses
Filters the returned list by the type ofCauseclass passed as input ex.getBuildCauses('hudson.model.Cause$UserIdCause')would return onlyCauses of that type- Parameters:
className- A string containing the fully qualified name for the class type to filter the result list by- Returns:
- a
JSONArrayofCauses of the specified type - Throws:
IOException
-
getResult
- Throws:
AbortException
-
getCurrentResult
- Throws:
AbortException
-
resultIsBetterOrEqualTo
- Throws:
AbortException
-
resultIsWorseOrEqualTo
- Throws:
AbortException
-
getTimeInMillis
- Throws:
AbortException
-
getStartTimeInMillis
- Throws:
AbortException
-
getDuration
- Throws:
AbortException
-
getDurationString
- Throws:
AbortException
-
getDescription
- Throws:
AbortException
-
getDisplayName
- Throws:
AbortException
-
getFullDisplayName
- Throws:
AbortException
-
isKeepLog
- Throws:
AbortException
-
getProjectName
- Throws:
AbortException
-
getFullProjectName
- Throws:
AbortException
-
getPreviousBuild
- Throws:
AbortException
-
getPreviousBuildInProgress
- Throws:
AbortException
-
getPreviousBuiltBuild
- Throws:
AbortException
-
getPreviousCompletedBuild
- Throws:
AbortException
-
getPreviousFailedBuild
- Throws:
AbortException
-
getPreviousNotFailedBuild
- Throws:
AbortException
-
getPreviousSuccessfulBuild
- Throws:
AbortException
-
getNextBuild
- Throws:
AbortException
-
getId
- Throws:
AbortException
-
getExternalizableId
-
getBuildVariables
Get environment variables defined in the build. This does not report build parameters for parameterised builds, only the build environment. If a child job is a Pipeline job (WorkflowRun), any variables set during script execution are captured and reported.- Throws:
AbortException
-
getUpstreamBuilds
- Throws:
AbortException
-
getAbsoluteUrl
- Throws:
AbortException
-
getChangeSets
- Throws:
Exception
-