Package com.atlassian.bamboo.task
Interface CommonTaskContext
-
- All Superinterfaces:
InternalTaskContext
,PluginKeyProvider
,TaskIdentifier
- All Known Subinterfaces:
DeploymentTaskContext
,TaskContext
- All Known Implementing Classes:
CommonTaskContextImpl
,DeploymentTaskContextImpl
,TaskContextImpl
public interface CommonTaskContext extends InternalTaskContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
doesTaskProduceTestResults()
@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()
AMap
ofString
values fromTaskDefinition.getConfiguration()
where the values have gone through variable substitution throughCustomVariableContext.substituteString(String)
.@NotNull File
getRootDirectory()
Get build root directory (where sources were checked out)@Nullable Map<String,String>
getRuntimeTaskContext()
@Nullable Map<String,WhitelistedSerializable>
getRuntimeTaskData()
@NotNull File
getWorkingDirectory()
Get build working directory (where task should be executed).-
Methods inherited from interface com.atlassian.bamboo.task.TaskIdentifier
getId, getPluginKey, getUserDescription, isEnabled, isFinalising
-
-
-
-
Method Detail
-
getCommonContext
@NotNull @NotNull CommonContext getCommonContext()
Contains all the build related information about the running of the tasks- Returns:
-
getBuildLogger
@NotNull @NotNull BuildLogger getBuildLogger()
Returns the appropriate logger for the task- Returns:
-
getRootDirectory
@NotNull @NotNull File getRootDirectory()
Get build root directory (where sources were checked out)- Returns:
- Build root directory
-
getWorkingDirectory
@NotNull @NotNull File getWorkingDirectory()
Get build working directory (where task should be executed).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 ofTaskConfigConstants.CFG_WORKING_SUBDIRECTORY
key.- Returns:
- Build working directory
-
getConfigurationMap
@NotNull @NotNull ConfigurationMap getConfigurationMap()
AMap
ofString
values fromTaskDefinition.getConfiguration()
where the values have gone through variable substitution throughCustomVariableContext.substituteString(String)
. All ${bamboo.*} and ${system.*} params are substituted.- Returns:
-
getRuntimeTaskContext
@Nullable @Nullable Map<String,String> getRuntimeTaskContext()
- Returns:
- custom runtime data that complement static task configuration
-
getRuntimeTaskData
@Nullable @Nullable Map<String,WhitelistedSerializable> getRuntimeTaskData()
- Returns:
- custom runtime data that complement static task configuration
-
doesTaskProduceTestResults
boolean doesTaskProduceTestResults()
- Since:
- 5.9
-
-