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 TaskIdentifier
Job
@NotNull public String getPluginKey()
getPluginKey
in interface PluginKeyProvider
getPluginKey
in interface TaskIdentifier
public String getUserDescription()
getUserDescription
in interface TaskIdentifier
public boolean isEnabled()
isEnabled
in interface TaskIdentifier
public boolean isFinalising()
isFinalising
in interface TaskIdentifier
@NotNull public CommonContext getBuildContext()
@NotNull public CommonContext getCommonContext()
CommonTaskContext
getCommonContext
in interface CommonTaskContext
@NotNull public BuildLogger getBuildLogger()
CommonTaskContext
getBuildLogger
in interface CommonTaskContext
@NotNull public File getRootDirectory()
CommonTaskContext
getRootDirectory
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()
CommonTaskContext
Map
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 CommonTaskContext
public boolean doesTaskProduceTestResults()
doesTaskProduceTestResults
in interface CommonTaskContext
Copyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.