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.
  • Constructor Details

    • Environment

      public Environment(@NotNull @NotNull String name)
      Specifies environment.
      Parameters:
      name - name of the environment.
  • Method Details

    • description

      public Environment description(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 is Environment.ReleaseApprovalPrerequisite.NOT_BROKEN.
      Parameters:
      releaseApprovalPrerequisite - the prerequisite to set
      Since:
      9.4
    • noneReleaseApprovalPrerequisite

      public Environment noneReleaseApprovalPrerequisite()
      Sets release approval prerequisite the environment requires to be met by deployment project release to Environment.ReleaseApprovalPrerequisite.NONE. That means there are no requirements. Any release can be deployed to the environment.
      Since:
      10.0
    • notBrokenReleaseApprovalPrerequisite

      public Environment notBrokenReleaseApprovalPrerequisite()
      Sets release approval prerequisite the environment requires to be met by deployment project release to Environment.ReleaseApprovalPrerequisite.NOT_BROKEN. That means the release can be deployed to the environment if it's not marked as broken by anyone. This is the default prerequisite.
      Since:
      10.0
    • approvedReleaseApprovalPrerequisite

      public Environment approvedReleaseApprovalPrerequisite()
      Sets release approval prerequisite the environment requires to be met by deployment project release to Environment.ReleaseApprovalPrerequisite.APPROVED. That means the release can be deployed to the environment if there is at least one approval and the release is not marked as broken by anyone.
      Since:
      10.0
    • tasks

      public Environment tasks(@NotNull @NotNull Task<?,?>... tasks)
      Adds provided Tasks to the list of tasks executed by the environment.
    • finalTasks

      public Environment finalTasks(@NotNull @NotNull Task<?,?>... finalTasks)
      Adds provided Tasks 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:
    • 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 String getName()
    • build

      protected EnvironmentProperties build()
      Specified by:
      build in class EntityPropertiesBuilder<EnvironmentProperties>