Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 680 Bytes

TerraformStartDirectoryPlugin.md

File metadata and controls

23 lines (16 loc) · 680 Bytes

This plugin changes the starting execution workspace directory. Commands will use this directory as current and any relative path will use it as base path.

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

Jenkinsfile.init(this)

TerraformStartDirectoryPlugin.withDirectory('./xyz/').init()

def validate = new TerraformValidateStage()

def deployQA = new TerraformEnvironmentStage('qa')
def deployUat = new TerraformEnvironmentStage('uat')
def deployProd = new TerraformEnvironmentStage('prod')

validate.then(deployQA)
        .then(deployUat)
        .then(deployProd)
        .build()