public interface ExecutableBuildAgent
ExecutableBuildAgent
that is able to be run builds. Basically it's an agent that's "local" to the
running directoryModifier and Type | Method and Description |
---|---|
void |
build(ReadOnlyCapabilitySet agentCapabilities,
DockerContainerController dockerContainerController)
Executes the passed
CommonContext |
boolean |
cancelBuild(String buildResultKey)
Cancels the passed buildResultKey if it matches
|
<V> V |
executeWithCurrentContext(Callable<V> callable)
Execute with guarantee that context will not be switched during execution.
|
AgentStatus |
getAgentStatus() |
CommonContext |
getBuilding()
Gets the
BuildContext related to the build that is building on the agent. |
String |
getDescription()
Agent description
|
long |
getId()
Agent id
|
String |
getName()
Agent name
|
int |
incrementError()
Tells the agent that an unhandled error has occurred.
|
boolean |
isActive() |
void |
onBuildProcessingFinished()
This method is called when the build process is completed and the result processing has finished.
|
void |
onContextReceived(CommonContext commonContext)
This method is called when the agent has just retrieved a context from queue
|
void |
resetErrors()
Resetes the error count
|
void |
setContextToBuild(CommonContext context) |
void |
start()
Starts the build agent
|
void |
stop()
Stops the build agent immediately.
|
void |
stopNicely()
Attempt to stop the agent and wait for the current build (if any) to stop building
|
void |
stopNicely(int statusCode)
Attempt to stop the agent and wait for the current build (if any) to stop building.
|
void |
waitForStop(int secondsToWait)
Waits a certain number of seconds for a build to stop.
|
long getId()
String getName()
@NotNull String getDescription()
void start()
void stop()
InterruptedException
void stopNicely()
void stopNicely(int statusCode)
void build(@NotNull ReadOnlyCapabilitySet agentCapabilities, @NotNull DockerContainerController dockerContainerController) throws Exception
CommonContext
agentCapabilities
- Exception
boolean cancelBuild(@NotNull String buildResultKey)
buildResultKey
- AgentStatus getAgentStatus()
boolean isActive()
@Nullable CommonContext getBuilding()
BuildContext
related to the build that is building on the agent. Null if not building or
cancelling anything.void setContextToBuild(@NotNull CommonContext context)
void waitForStop(int secondsToWait) throws TimeoutException
secondsToWait
- -TimeoutException
int incrementError()
void resetErrors()
void onBuildProcessingFinished()
void onContextReceived(@NotNull CommonContext commonContext)
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.