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() |
@NotNull CommonContext |
getBuildContext() |
@NotNull BuildLogger |
getBuildLogger()
Returns the appropriate logger for the task
|
@NotNull CommonContext |
getCommonContext()
Contains all the build related information about the running of the tasks
|
@NotNull ConfigurationMap |
getConfigurationMap()
A
Map of String values from TaskDefinition.getConfiguration() where the values have gone
through variable substitution through CustomVariableContext.substituteString(String) . |
long |
getId() |
@NotNull String |
getPluginKey() |
@NotNull File |
getRootDirectory()
Get build root directory (where sources were checked out)
|
@Nullable Map<String,String> |
getRuntimeTaskContext() |
@Nullable Map<String,WhitelistedSerializable> |
getRuntimeTaskData() |
String |
getUserDescription() |
@NotNull 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 @NotNull 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 @NotNull CommonContext getBuildContext()
@NotNull public @NotNull CommonContext getCommonContext()
CommonTaskContext
getCommonContext
in interface CommonTaskContext
@NotNull public @NotNull BuildLogger getBuildLogger()
CommonTaskContext
getBuildLogger
in interface CommonTaskContext
@NotNull public @NotNull File getRootDirectory()
CommonTaskContext
getRootDirectory
in interface CommonTaskContext
@NotNull public @NotNull 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 @NotNull 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 @Nullable Map<String,String> getRuntimeTaskContext()
getRuntimeTaskContext
in interface CommonTaskContext
@Nullable public @Nullable Map<String,WhitelistedSerializable> getRuntimeTaskData()
getRuntimeTaskData
in interface CommonTaskContext
public boolean doesTaskProduceTestResults()
doesTaskProduceTestResults
in interface CommonTaskContext
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.