AnsiColorPlugin.md

May 18, 2022 ยท View on GitHub

AnsiColorPlugin

Enable this plugin to color the output for terraform plan and apply.

One-time setup:

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

Jenkinsfile.init(this, env)

AnsiColorPlugin.init() // Decorate your TerraformEnvironmentStages with the AnsiColor plugin

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()