Package com.atlassian.bamboo.upgrade
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 Summary
Fields Modifier and Type Field Description protected com.atlassian.bandana.BandanaManager
bandanaManager
-
Fields inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
errors
-
-
Constructor Summary
Constructors Constructor Description AbstractRepeatableTask(@NotNull String buildNumber, @NotNull String shortDescription)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
doRepeatableTask()
void
doUpgrade()
Perform the upgrade.protected @Nullable String
getRunOnlyOnceId()
Unique key of the task, used to run the task just once.protected boolean
hasBeenRun()
protected boolean
needsUpgrade()
-
Methods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeTask
getBuildNumber, getErrors, getShortDescription
-
-
-
-
Method Detail
-
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
-
-