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
Modifier and TypeMethodDescriptiondecorateProcessCommand
(@NotNull List<String> command) Modifies given command by executing command decorators available in the current context.@NotNull BuildKey
@NotNull BuildLogger
@NotNull CommonContext
@NotNull String
getPaths()
@NotNull ResultKey
@Nullable CommonTaskContext
@NotNull String
long
Returns and id of the current task.@NotNull String
@NotNull VariableContext
boolean
Controls the amount of logging during the execution.
-
Method Details
-
getBuildLogger
- Returns:
- a build logger for current executable.
-
getResultKey
- Returns:
- result key of current execution
-
getJobDisplayName
- Returns:
- display name of job or environment being executed
-
getTaskDescription
- Returns:
- current task description or empty string if none
-
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
- Returns:
- plugin key of current task or an empty string if none
-
getCommonContext
- Returns:
- execution context of current job/environment
-
getEnvironment
- Returns:
- environment variables used for process execution
-
getPaths
- Returns:
- content of "PATH" variable used for process execution
-
decorateProcessCommand
Modifies given command by executing command decorators available in the current context.- Parameters:
command
-- Returns:
-
getTaskContext
- Returns:
- current task context or null if not in task context
-
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
-