forked from codepipe/tff
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
39 lines (38 loc) · 914 Bytes
/
Jenkinsfile
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
29
30
31
32
33
34
35
36
37
38
39
pipeline {
agent any
tools {
terraform 'terraform'
}
stages {
stage ("checkout from GIT") {
steps {
git branch: 'main', credentialsId: 'cde06f21-9ae7-4081-a549-f7bdb515dc6f', url: 'https://github.com/codepipe/tff.git'
}
}
stage ("terraform init") {
steps {
sh 'terraform init'
}
}
stage ("terraform fmt") {
steps {
sh 'terraform fmt'
}
}
stage ("terraform validate") {
steps {
sh 'terraform validate'
}
}
stage ("terrafrom plan") {
steps {
sh 'terraform plan '
}
}
stage ("terraform apply") {
steps {
sh 'terraform apply --auto-approve'
}
}
}
}