com.atlassian.bamboo.task
Interface TaskContext


public interface TaskContext

Encapsulates the environment and configuration of a task running in a building environment.

Since:
3.1
See Also:
TaskType, TaskIdentifier

Method Summary
 BuildContext getBuildContext()
          Contains all the build related information about the running of the tasks
 BuildLogger getBuildLogger()
          Returns the appropriate logger for the task
 ConfigurationMap getConfigurationMap()
          A Map of String values from TaskDefinition.getConfiguration() where the values have gone through variable substitution through CustomVariableContext#substituteString().
 java.io.File getRootDirectory()
          Get build root directory (where sources were checked out)
 java.io.File getWorkingDirectory()
          Get build working directory (where task should be executed).
 

Method Detail

getBuildContext

@NotNull
BuildContext getBuildContext()
Contains all the build related information about the running of the tasks

Returns:

getBuildLogger

@NotNull
BuildLogger getBuildLogger()
Returns the appropriate logger for the task

Returns:

getRootDirectory

@NotNull
java.io.File getRootDirectory()
Get build root directory (where sources were checked out)

Returns:
Build root directory

getWorkingDirectory

@NotNull
java.io.File getWorkingDirectory()
Get build working directory (where task should be executed). Default implementation checks for the TaskConfigConstants.CFG_WORKING_SUB_DIRECTORY key in the TaskConfiguration if such key exists and has not empty value then working directory would be getRootDirectory() + value of TaskConfigConstants.CFG_WORKING_SUB_DIRECTORY key.

Returns:
Build working directory

getConfigurationMap

@NotNull
ConfigurationMap getConfigurationMap()
A Map of String values from TaskDefinition.getConfiguration() where the values have gone through variable substitution through CustomVariableContext#substituteString(). All ${bamboo.*} and ${system.*} params are substituted.

Returns:


Copyright © 2011 Atlassian. All Rights Reserved.