Class DeadlineTimeOutStrategy
java.lang.Object
hudson.plugins.build_timeout.BuildTimeOutStrategy
hudson.plugins.build_timeout.impl.DeadlineTimeOutStrategy
- All Implemented Interfaces:
Describable<BuildTimeOutStrategy>
If the build reaches
deadlineTime
, it will be terminated.- Author:
- Fernando Miguélez Palomo (fernando.miguelez@gmail.com)
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
static final int
protected static final String
protected static final String
protected static final String
Fields inherited from class hudson.plugins.build_timeout.BuildTimeOutStrategy
LOG, MINUTES
-
Constructor Summary
ConstructorDescriptionDeadlineTimeOutStrategy
(String deadlineTime, int deadlineToleranceInMinutes) -
Method Summary
Modifier and TypeMethodDescriptionint
long
getTimeOut
(AbstractBuild<?, ?> build, BuildListener listener) Define the delay (in milliseconds) to wait for the build to complete before interrupting.toString()
Methods inherited from class hudson.plugins.build_timeout.BuildTimeOutStrategy
expandAll, getDescriptor, getTimeOut, hasMacros, onWrite, onWrite, wantsCaptureLog
-
Field Details
-
MINIMUM_DEADLINE_TOLERANCE_IN_MINUTES
public static final int MINIMUM_DEADLINE_TOLERANCE_IN_MINUTES- See Also:
-
DEADLINE_REGEXP
- See Also:
-
TIME_LONG_FORMAT_PATTERN
- See Also:
-
TIME_SHORT_FORMAT_PATTERN
- See Also:
-
TIMESTAMP_FORMAT_PATTERN
- See Also:
-
-
Constructor Details
-
DeadlineTimeOutStrategy
@DataBoundConstructor public DeadlineTimeOutStrategy(String deadlineTime, int deadlineToleranceInMinutes)
-
-
Method Details
-
getDeadlineTime
- Returns:
- deadline time
-
getDeadlineToleranceInMinutes
public int getDeadlineToleranceInMinutes()- Returns:
- deadline tolerance in minutes
-
getTimeOut
public long getTimeOut(@NonNull AbstractBuild<?, ?> build, @NonNull BuildListener listener) throws InterruptedException, org.jenkinsci.plugins.tokenmacro.MacroEvaluationException, IOException, IllegalArgumentExceptionDescription copied from class:BuildTimeOutStrategy
Define the delay (in milliseconds) to wait for the build to complete before interrupting.- Overrides:
getTimeOut
in classBuildTimeOutStrategy
- Parameters:
build
- the buildlistener
- the build listener- Throws:
InterruptedException
org.jenkinsci.plugins.tokenmacro.MacroEvaluationException
IOException
IllegalArgumentException
-
toString
-