Skip to content

Commit 6ab5cd8

Browse files
committed
added jenkins inegration with terraform
1 parent 6598a2b commit 6ab5cd8

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed
Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
pipeline {
22
agent any
3-
options { timestamps () }
4-
stages{
5-
stage('terraform-Demo') {
6-
steps {
7-
script {
8-
dir("ta-setup")
9-
{
10-
git branch: 'tf-jenkins', url: 'https://github.com/easyawslearn/Terraform-Tutorial.git'
11-
sh 'cd EC2withJenkins '
12-
sh './terraform init -upgrade=true -get=true -input=false -force-copy'
13-
sh './terraform workspace new "terraform-demo"'
14-
sh 'echo "INFO: New terraform-demo workspace added."'
15-
sh './terraform workspace select terraform-demo'
16-
sh 'echo "INFO: Terraform -> Planning..."'
17-
sh './terraform plan -out plan_terraform -lock=true'
18-
sh 'echo "INFO: Terraform -> Executing..."'
19-
sh './terraform apply plan_plan_terraform'
3+
stages{
4+
stage('terraform-Demo') {
5+
steps {
6+
script {
7+
dir("ta-setup")
8+
{
9+
git branch: 'tf-jenkins', url: 'https://github.com/easyawslearn/Terraform-Tutorial.git'
10+
sh 'cd EC2withJenkins '
11+
sh './terraform init -upgrade=true -get=true -input=false -force-copy'
12+
sh './terraform workspace new "terraform-demo"'
13+
sh 'echo "INFO: New terraform-demo workspace added."'
14+
sh './terraform workspace select terraform-demo'
15+
sh 'echo "INFO: Terraform -> Planning..."'
16+
sh './terraform plan -out plan_terraform -lock=true'
17+
sh 'echo "INFO: Terraform -> Executing..."'
18+
sh './terraform apply plan_plan_terraform'
19+
}
20+
}
21+
}
2022
}
21-
}
2223
}
2324
}
24-
}
25-
}

0 commit comments

Comments
 (0)