public interface ExecutableBuildAgent
ExecutableBuildAgent that is able to be run builds. Basically it's an agent that's "local" to the
running directory| Modifier and Type | Method and Description |
|---|---|
void |
build(@NotNull ReadOnlyCapabilitySet agentCapabilities,
@NotNull DockerContainerController dockerContainerController)
Executes the passed
CommonContext |
boolean |
cancelBuild(@NotNull 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() |
@Nullable CommonContext |
getBuilding()
Gets the
BuildContext related to the build that is building on the agent. |
@NotNull 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(@NotNull CommonContext commonContext)
This method is called when the agent has just retrieved a context from queue
|
void |
resetErrors()
Resetes the error count
|
void |
setContextToBuild(@NotNull 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 @NotNull String getDescription()
void start()
void stop()
InterruptedExceptionvoid stopNicely()
void stopNicely(int statusCode)
void build(@NotNull
@NotNull ReadOnlyCapabilitySet agentCapabilities,
@NotNull
@NotNull DockerContainerController dockerContainerController)
throws Exception
CommonContextagentCapabilities - Exceptionboolean cancelBuild(@NotNull
@NotNull String buildResultKey)
buildResultKey - AgentStatus getAgentStatus()
boolean isActive()
@Nullable @Nullable CommonContext getBuilding()
BuildContext related to the build that is building on the agent. Null if not building or
cancelling anything.void setContextToBuild(@NotNull
@NotNull CommonContext context)
void waitForStop(int secondsToWait)
throws TimeoutException
secondsToWait - -TimeoutExceptionint incrementError()
void resetErrors()
void onBuildProcessingFinished()
void onContextReceived(@NotNull
@NotNull CommonContext commonContext)
Copyright © 2023 Atlassian Software Systems Pty Ltd. All rights reserved.