Class AbstractRepeatableTask

java.lang.Object
com.atlassian.bamboo.upgrade.AbstractUpgradeTask
com.atlassian.bamboo.upgrade.AbstractRepeatableTask
All Implemented Interfaces:
UpgradeTask
Direct Known Subclasses:
AbstractFormerCloudUpgrade, AddIndicesToForeignKeys, ApplySchemaFixups, UpdateSpecsRunnerDockerImage

public abstract class AbstractRepeatableTask extends AbstractUpgradeTask
An upgrade task that can be run as many times as needed. Repeatable task are invoked in order of their build numbers after all other upgrade tasks. Each task decides individually if it needs to do anything or not.
  • Field Details

    • bandanaManager

      @Autowired protected com.atlassian.bandana.BandanaManager bandanaManager
  • Constructor Details

    • AbstractRepeatableTask

      public AbstractRepeatableTask(@NotNull @NotNull String buildNumber, @NotNull @NotNull String shortDescription)
  • Method Details

    • doRepeatableTask

      protected abstract void doRepeatableTask() throws Exception
      Throws:
      Exception
    • getRunOnlyOnceId

      @Nullable protected @Nullable String getRunOnlyOnceId()
      Unique key of the task, used to run the task just once.
    • hasBeenRun

      protected boolean hasBeenRun()
    • needsUpgrade

      protected boolean needsUpgrade()
    • doUpgrade

      public void doUpgrade() throws Exception
      Description copied from interface: UpgradeTask
      Perform the upgrade.
      Throws:
      Exception - to signalize error during upgrade process