Class Environment
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<EnvironmentProperties>
-
- com.atlassian.bamboo.specs.api.builders.deployment.Environment
-
public class Environment extends EntityPropertiesBuilder<EnvironmentProperties>
Represents a deployment environment.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEnvironment.ReleaseApprovalPrerequisiteSpecifies whether the release must be approved before deploying to the environment and if broken releases are allowed.
-
Constructor Summary
Constructors Constructor Description Environment(@NotNull java.lang.String name)Specifies environment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EnvironmentPropertiesbuild()Environmentdescription(java.lang.String description)Sets the environment description.EnvironmentdockerConfiguration(@NotNull DockerConfiguration dockerConfiguration)Configure Docker for this environment.EnvironmentfinalTasks(@NotNull Task<?,?>... finalTasks)Adds providedTasks to the list of the final tasks executed by the environment.java.lang.StringgetName()Environmentnotifications(@NotNull Notification... notifications)Appends a notification rule to the environment.EnvironmentpluginConfigurations(@NotNull EnvironmentPluginConfiguration<? extends EnvironmentPluginConfigurationProperties>... pluginConfigurations)Appends plugin configuration to the environment.EnvironmentreleaseApprovalPrerequisite(@NotNull Environment.ReleaseApprovalPrerequisite releaseApprovalPrerequisite)Sets release approval prerequisite the environment requires to be met by deployment project release before the deployment can be launched.Environmentrequirements(Requirement... requirements)Adds custom requirements to the environment.Environmenttasks(@NotNull Task<?,?>... tasks)Adds providedTasks to the list of tasks executed by the environment.Environmenttriggers(@NotNull Trigger<?,?>... triggers)Adds triggers to this environment.Environmentvariables(@NotNull Variable... variables)Adds deployment environment variables.
-
-
-
Method Detail
-
description
public Environment description(java.lang.String description)
Sets the environment description.
-
releaseApprovalPrerequisite
public Environment releaseApprovalPrerequisite(@NotNull @NotNull Environment.ReleaseApprovalPrerequisite releaseApprovalPrerequisite)
Sets release approval prerequisite the environment requires to be met by deployment project release before the deployment can be launched. The deployment project release is the context the environment is executed in. The default prerequisite isEnvironment.ReleaseApprovalPrerequisite.NOT_BROKEN.- Parameters:
releaseApprovalPrerequisite- the prerequisite to set- Since:
- 9.4
-
tasks
public Environment tasks(@NotNull @NotNull Task<?,?>... tasks)
Adds providedTasks to the list of tasks executed by the environment.
-
finalTasks
public Environment finalTasks(@NotNull @NotNull Task<?,?>... finalTasks)
Adds providedTasks to the list of the final tasks executed by the environment.Final tasks for a environment are always executed, even if previous tasks in the environment failed.
-
triggers
public Environment triggers(@NotNull @NotNull Trigger<?,?>... triggers)
Adds triggers to this environment.
-
variables
public Environment variables(@NotNull @NotNull Variable... variables)
Adds deployment environment variables.
-
requirements
public Environment requirements(Requirement... requirements)
Adds custom requirements to the environment.Requirements control which Bamboo agents are able to execute deployments to the environment.
-
notifications
public Environment notifications(@NotNull @NotNull Notification... notifications)
Appends a notification rule to the environment.
-
dockerConfiguration
public Environment dockerConfiguration(@NotNull @NotNull DockerConfiguration dockerConfiguration)
Configure Docker for this environment.- See Also:
DockerConfiguration
-
pluginConfigurations
public Environment pluginConfigurations(@NotNull @NotNull EnvironmentPluginConfiguration<? extends EnvironmentPluginConfigurationProperties>... pluginConfigurations)
Appends plugin configuration to the environment. If the same plugin is specified second time, its configuration is overwritten.
-
getName
public java.lang.String getName()
-
build
protected EnvironmentProperties build()
- Specified by:
buildin classEntityPropertiesBuilder<EnvironmentProperties>
-
-