Class RepositoryBasedTrigger<T extends RepositoryBasedTrigger<T,P>,P extends RepositoryBasedTriggerProperties>

Direct Known Subclasses:
AnyTrigger, BitbucketCloudTrigger, BitbucketServerTrigger, GitHubTrigger, RemoteTrigger, RepositoryPollingTrigger

public abstract class RepositoryBasedTrigger<T extends RepositoryBasedTrigger<T,P>,P extends RepositoryBasedTriggerProperties> extends Trigger<T,P>
Represents a definition of trigger which uses a Bamboo repository to activate builds.

This class contains common data only. In order to define a specific type of trigger one should use the specialised implementation or, if such is not available, AnyTrigger class.

  • Field Details

  • Constructor Details

    • RepositoryBasedTrigger

      public RepositoryBasedTrigger()
  • Method Details

    • triggeringRepositoriesType

      public T triggeringRepositoriesType(@NotNull @NotNull RepositoryBasedTrigger.TriggeringRepositoriesType triggeringRepositoriesType)
      Selects the mode of selecting repositories this trigger should check. Possible values:
      ALL
      Select all repositories that work with this trigger
      SELECTED
      Pick repositories manually. See selectedTriggeringRepositories(VcsRepositoryIdentifier...)
      Default is ALL.
    • allAvailableTriggeringRepositories

      public T allAvailableTriggeringRepositories()
      Sets all repositories available in this plan and making sense for specific trigger type (exp: all Bitbucket repositories defined in plan for Bitbucket trigger) for the trigger. This is the default behaviour.
    • selectedTriggeringRepositories

      public T selectedTriggeringRepositories(@NotNull @NotNull VcsRepositoryIdentifier... triggeringRepositories)
      Adds the source repository for the trigger.

      Bamboo trigger can check a source repository for changes in order to trigger the build execution upon new commits. The detailed behaviour which specify the exact rules of detecting changes are specified by specialised implementation of this class.

      Parameters:
      triggeringRepositories - Trigger source repositories referenced by VcsRepositoryIdentifierProperties