@PublicApi public interface TaskContext extends CommonTaskContext
N.B All methods remain on this interface (even though they are on the super class) so we don't accidentally break backwards compatibility.
TaskType,
TaskIdentifier| Modifier and Type | Method and Description |
|---|---|
@NotNull BuildContext |
getBuildContext()
Contains all the build related information about the running of the tasks
|
@NotNull BuildLogger |
getBuildLogger()
Returns the appropriate logger for the task
|
@NotNull ConfigurationMap |
getConfigurationMap()
A
Map of String values from TaskDefinition.getConfiguration() where the values have gone
through variable substitution through CustomVariableContext.substituteString(String). |
@NotNull File |
getRootDirectory()
Get build root directory (where sources were checked out)
|
@Nullable Map<String,String> |
getRuntimeTaskContext() |
@NotNull File |
getWorkingDirectory()
Get build working directory (where task should be executed).
|
doesTaskProduceTestResults, getCommonContext, getRuntimeTaskDatagetId, getPluginKey, getUserDescription, isEnabled, isFinalising@NotNull @NotNull BuildContext getBuildContext()
@NotNull @NotNull BuildLogger getBuildLogger()
getBuildLogger in interface CommonTaskContext@NotNull @NotNull File getRootDirectory()
getRootDirectory in interface CommonTaskContext@NotNull @NotNull File getWorkingDirectory()
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 @NotNull ConfigurationMap getConfigurationMap()
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 @Nullable Map<String,String> getRuntimeTaskContext()
getRuntimeTaskContext in interface CommonTaskContextCopyright © 2023 Atlassian Software Systems Pty Ltd. All rights reserved.