Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 638 Bytes

PlanOnlyPlugin.md

File metadata and controls

24 lines (17 loc) · 638 Bytes

Enable this plugin to add a parameter to the build which will restrict pipeline functionality to terraform plan only.

// Jenkinsfile
@Library(['terraform-pipeline@v3.10']) _

Jenkinsfile.init(this, env)

// This enables the "plan only" functionality
PlanOnlyPlugin.init()

def validate = new TerraformValidateStage()

def destroyQa = new TerraformEnvironmentStage('qa')
def destroyUat = new TerraformEnvironmentStage('uat')
def destroyProd = new TerraformEnvironmentStage('prod')

validate.then(destroyQa)
        .then(destroyUat)
        .then(destroyProd)
        .build()