forked from dOpensource/dsiprouter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
28 lines (28 loc) · 687 Bytes
/
Jenkinsfile
File metadata and controls
28 lines (28 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
pipeline {
parameters {
password (name: 'DIGITALOCEAN_TOKEN')
}
environment {
TF_WORKSPACE = 'dev' //Sets the Terraform Workspace
TF_IN_AUTOMATION = 'true'
DIGITALOCEAN_TOKEN = "${params.DIGITALOCEAN_TOKEND}"
}
stages {
stage('Terraform Init') {
steps {
sh "${env.TERRAFORM_HOME}/terraform init -input=false"
}
}
stage('Terraform Plan') {
steps {
sh "${env.TERRAFORM_HOME}/terraform plan -out=tfplan -input=false -var-file='dev.tfvars'"
}
}
stage('Terraform Apply') {
steps {
input 'Apply Plan'
sh "${env.TERRAFORM_HOME}/terraform apply -input=false tfplan"
}
}
}
}