-
Notifications
You must be signed in to change notification settings - Fork 298
Expand file tree
/
Copy pathpipelinecode
More file actions
36 lines (34 loc) · 800 Bytes
/
pipelinecode
File metadata and controls
36 lines (34 loc) · 800 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
29
30
31
32
33
34
35
36
pipeline {
agent any
environment {
AWS_ACCESS_KEY_ID = credentials('accesskey')
AWS_SECRET_ACCESS_KEY = credentials('secretkey')
}
stages {
stage('checkout') {
steps {
git 'https://github.com/devopsbyraham/terraform-project.git'
}
}
stage('init') {
steps {
sh 'terraform init'
}
}
stage('validate') {
steps {
sh 'terraform validate'
}
}
stage('plan') {
steps {
sh 'terraform plan'
}
}
stage('action') {
steps {
sh 'terraform $action --auto-approve'
}
}
}
}