Package com.atlassian.bamboo.process
Interface ProcessContext
-
- All Known Implementing Classes:
ProcessContextImpl
public interface ProcessContext
Represents context for running external processes in context of a Bamboo executable. Contains additional information when process is owned by a task.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull List<String>
decorateProcessCommand(@NotNull List<String> command)
Modifies given command by executing command decorators available in the current context.@NotNull BuildKey
getBuildKey()
@NotNull BuildLogger
getBuildLogger()
@NotNull CommonContext
getCommonContext()
@NotNull Map<String,String>
getEnvironment()
@NotNull String
getJobDisplayName()
@NotNull List<String>
getPaths()
@NotNull ResultKey
getResultKey()
@Nullable CommonTaskContext
getTaskContext()
@NotNull String
getTaskDescription()
long
getTaskId()
Returns and id of the current task.@NotNull String
getTaskPluginKey()
@NotNull VariableContext
getVariableContext()
boolean
isVerboseLoggingOn()
Controls the amount of logging during the execution.
-
-
-
Method Detail
-
getBuildLogger
@NotNull @NotNull BuildLogger getBuildLogger()
- Returns:
- a build logger for current executable.
-
getResultKey
@NotNull @NotNull ResultKey getResultKey()
- Returns:
- result key of current execution
-
getJobDisplayName
@NotNull @NotNull String getJobDisplayName()
- Returns:
- display name of job or environment being executed
-
getTaskDescription
@NotNull @NotNull String getTaskDescription()
- Returns:
- current task description or empty string if none
-
getVariableContext
@NotNull @NotNull VariableContext getVariableContext()
- Returns:
- variable context of current execution
-
getTaskId
long getTaskId()
Returns and id of the current task. If not a scope of a task returns a unique number that will not clash with id of any task.
-
getTaskPluginKey
@NotNull @NotNull String getTaskPluginKey()
- Returns:
- plugin key of current task or an empty string if none
-
getCommonContext
@NotNull @NotNull CommonContext getCommonContext()
- Returns:
- execution context of current job/environment
-
getEnvironment
@NotNull @NotNull Map<String,String> getEnvironment()
- Returns:
- environment variables used for process execution
-
getPaths
@NotNull @NotNull List<String> getPaths()
- Returns:
- content of "PATH" variable used for process execution
-
decorateProcessCommand
@NotNull @NotNull List<String> decorateProcessCommand(@NotNull @NotNull List<String> command)
Modifies given command by executing command decorators available in the current context.- Parameters:
command
-- Returns:
-
getTaskContext
@Nullable @Nullable CommonTaskContext getTaskContext()
- Returns:
- current task context or null if not in task context
-
getBuildKey
@NotNull @NotNull BuildKey getBuildKey()
- Returns:
- unique key of the current context
-
isVerboseLoggingOn
boolean isVerboseLoggingOn()
Controls the amount of logging during the execution. Some of the logging is only output in verbose mode.- Returns:
- true if verbose logging is enabled.
- Since:
- 7.2
-
-