RetryBuildTrigger
Triggers the build if the previous build failed after a specified time delay
Example. Trigger a new build if the last build failed. Wait at least for 30 seconds before adding a new build to the queue. Move the newly triggered build to the top of the queue.
buildType {
// Other Build Type settings ...
triggers {
// Other Triggers ...
retryBuild {
delaySeconds = 30
moveToTheQueueTop = true
}
Content copied to clipboard }
}
Example. Trigger a new build if the last build in the branch with prefix 'feature/' failed. Retry only once.
buildType {
// Other Build Type settings ...
triggers {
// Other Triggers ...
retryBuild {
attempts = 1
branchFilter = "+:feature/*"
}
Content copied to clipboard }
}
See also
Constructors
Functions
Configures build parameters that are applied to triggered builds
Deletes all configured build parameters
Copies parameters of this object to the specified target
Creates an instance of this trigger via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.
Validates this object and reports found errors to the provided consumer
Properties
Branch filter specifies the set of branches where Retry Build Trigger should attempt to retry builds
Whether the build should be triggered with clean checkout
When the enforceCleanCheckout is set to true specifies whether the clean checkout should also be applied to all dependencies.