pipeline { agent any stages { stage('Init') { steps { echo 'Test stage' sh '''export PATH=$PATH:/var/jenkins_home terraform init''' } } stage('Plan') { steps { sh '''export PATH=$PATH:/var/jenkins_home terraform plan''' } } stage('Apply') { steps { sh '''export PATH=$PATH:/var/jenkins_home terraform apply -auto-approve''' } } stage('Destroy') { steps { sh '''export PATH=$PATH:/var/jenkins_home terraform destroy -auto-approve''' } } } }