Handles workspaces within a task.
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
NAME |
Constructor and description |
---|
WorkspaceExtension
(Provider<TerraformSourceDirectorySet> tsdsProvider, Provider<java.io.File> logDir, java.util.concurrent.Callable<TerraformExecSpec> execSpecProvider, java.lang.String workspaceName, ProjectOperations projectOperations) |
Type Params | Return Type | Name and description |
---|---|---|
|
boolean |
hasWorkspaces() Indicated whether this task is associated with a source set which has workspaces other than just default. |
|
java.util.Map<java.lang.String, java.lang.Boolean> |
listWorkspaces() Lists the workspaces as currently known to Terraform |
|
java.lang.String |
runWorkspaceSubcommand(java.lang.String cmd, java.lang.String... args) Runs a terraform workspace subcommand. |
|
void |
switchWorkspace() Switches workspaces to the correct one if the source set has workspaces and the current workspace is not the correct one. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Indicated whether this task is associated with a source set which has workspaces other than just default.
true
if there are workspaces.Lists the workspaces as currently known to Terraform
Runs a terraform workspace
subcommand.
cmd
- Subcommand to run.Switches workspaces to the correct one if the source set has workspaces and the current workspace is not the correct one. If no additional workspace or the task is workspace agnostic, then it will do-nothing.