You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The terraform-pipeline supports setting up a Declarative pipeline. Declarative pipelines give us the advantage of restarting pipeline from a stage from a previous run. "Restart from Stage" requires the stash artifact to be available to use in a subsequent stage.
With terraform-pipeline, the Restart from stage does not work since the artifact is not stashed and preserved for a future run. Jenkins pipeline library requires "preserveStashes" option setup in order for "Restart from stage" to work.
preserveStashes Preserve stashes from completed builds, for use with stage restarting. For example: options {
preserveStashes() } to preserve the stashes from the most recent completed build, or options
{ preserveStashes(buildCount: 5) } to preserve the stashes from the five most recent completed builds.
Overview
The terraform-pipeline supports setting up a Declarative pipeline. Declarative pipelines give us the advantage of restarting pipeline from a stage from a previous run. "Restart from Stage" requires the stash artifact to be available to use in a subsequent stage.
With terraform-pipeline, the Restart from stage does not work since the artifact is not stashed and preserved for a future run. Jenkins pipeline library requires "preserveStashes" option setup in order for "Restart from stage" to work.
Ref: https://www.jenkins.io/doc/book/pipeline/syntax/
Workaround
terraform-pipeline/vars/Pipeline5Stage.groovy
Add options { preserveStashes() }
Or use a CustomPipelineTemplate to override the pipeline
The text was updated successfully, but these errors were encountered: