File tree Expand file tree Collapse file tree 1 file changed +19
-20
lines changed
aws-instance-first-script Expand file tree Collapse file tree 1 file changed +19
-20
lines changed Original file line number Diff line number Diff line change 1
1
pipeline {
2
2
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
+ }
20
22
}
21
- }
22
23
}
23
24
}
24
- }
25
- }
You can’t perform that action at this time.
0 commit comments