public class CommonTaskContextImpl extends Object implements CommonTaskContext
| Modifier and Type | Field and Description |
|---|---|
protected TaskRootDirectorySelector |
rootDirectorySelector |
protected TaskExecutionContext |
taskExecutionContext |
| Constructor and Description |
|---|
CommonTaskContextImpl(Map<String,String> substitutedConfiguration,
TaskExecutionContext taskExecutionContext,
RuntimeTaskDefinition taskDefinition) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doesTaskProduceTestResults() |
CommonContext |
getBuildContext() |
BuildLogger |
getBuildLogger()
Returns the appropriate logger for the task
|
CommonContext |
getCommonContext()
Contains all the build related information about the running of the tasks
|
ConfigurationMap |
getConfigurationMap()
A
Map of String values from TaskDefinition.getConfiguration() where the values have gone
through variable substitution through CustomVariableContext.substituteString(String). |
long |
getId() |
String |
getPluginKey() |
File |
getRootDirectory()
Get build root directory (where sources were checked out)
|
Map<String,String> |
getRuntimeTaskContext() |
Map<String,WhitelistedSerializable> |
getRuntimeTaskData() |
String |
getUserDescription() |
File |
getWorkingDirectory()
Get build working directory (where task should be executed).
|
boolean |
isEnabled() |
boolean |
isFinalising() |
protected final TaskRootDirectorySelector rootDirectorySelector
protected final TaskExecutionContext taskExecutionContext
public CommonTaskContextImpl(Map<String,String> substitutedConfiguration, TaskExecutionContext taskExecutionContext, RuntimeTaskDefinition taskDefinition)
public long getId()
getId in interface TaskIdentifierJob@NotNull public String getPluginKey()
getPluginKey in interface PluginKeyProvidergetPluginKey in interface TaskIdentifierpublic String getUserDescription()
getUserDescription in interface TaskIdentifierpublic boolean isEnabled()
isEnabled in interface TaskIdentifierpublic boolean isFinalising()
isFinalising in interface TaskIdentifier@NotNull public CommonContext getBuildContext()
@NotNull public CommonContext getCommonContext()
CommonTaskContextgetCommonContext in interface CommonTaskContext@NotNull public BuildLogger getBuildLogger()
CommonTaskContextgetBuildLogger in interface CommonTaskContext@NotNull public File getRootDirectory()
CommonTaskContextgetRootDirectory in interface CommonTaskContext@NotNull public File getWorkingDirectory()
CommonTaskContext
Default implementation checks for the TaskConfigConstants.CFG_WORKING_SUBDIRECTORY key in the
TaskConfiguration if such key exists and has not empty value then working directory would be getRootDirectory() +
value of TaskConfigConstants.CFG_WORKING_SUBDIRECTORY key.
getWorkingDirectory in interface CommonTaskContext@NotNull public ConfigurationMap getConfigurationMap()
CommonTaskContextMap of String values from TaskDefinition.getConfiguration() where the values have gone
through variable substitution through CustomVariableContext.substituteString(String). All ${bamboo.*} and
${system.*} params are substituted.getConfigurationMap in interface CommonTaskContext@Nullable public Map<String,String> getRuntimeTaskContext()
getRuntimeTaskContext in interface CommonTaskContext@Nullable public Map<String,WhitelistedSerializable> getRuntimeTaskData()
getRuntimeTaskData in interface CommonTaskContextpublic boolean doesTaskProduceTestResults()
doesTaskProduceTestResults in interface CommonTaskContextCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.