-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix_terraform.sh
More file actions
executable file
·24 lines (24 loc) · 946 Bytes
/
fix_terraform.sh
File metadata and controls
executable file
·24 lines (24 loc) · 946 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
#!/bin/bash
# Update Terraform Setup stage
sed -i '/stage("Terraform Setup")/,/}/c\
stage("Terraform Setup") {\
steps {\
timeout(time: 2, unit: "MINUTES") {\
withCredentials([\
aws(\
credentialsId: "aws-credentials",\
accessKeyVariable: "AWS_ACCESS_KEY_ID",\
secretKeyVariable: "AWS_SECRET_ACCESS_KEY"\
)\
]) {\
dir("terraform") {\
sh """\
echo "Initializing Terraform..."\
terraform init -input=false -backend=false\
echo "Using default workspace"\
"""\
}\
}\
}\
}\
}' Jenkinsfile