File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 5
5
### CLI
6
6
- new command unipipe generate terraform-runner-hello-world will generate a sample catalog + terraform files for use with unipipe terraform command
7
7
8
+ ### Terraform Runner
9
+ - Improve runner script robustness
10
+ - Abort cron job if Git repo setup fails
11
+
8
12
## v1.7.1
9
13
10
14
### Terraform Runner
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/bin/env bash
2
+ # Exit on all errors and undefined vars
3
+ set -o errexit
4
+ set -o errtrace
5
+ set -o pipefail
6
+ set -o nounset
2
7
3
8
REPO_NAME=instances-repo
4
9
REPO_DIR=~ /unipipe/$REPO_NAME
5
- if [ ! -f " $REPO_DIR " ]; then
6
- cat > ~/.ssh/id_rsa <<< " ${GIT_SSH_KEY}"
10
+ if [[ ! -d " $REPO_DIR " ] ]; then
11
+ cat > ~ /.ssh/id_rsa <<< " ${GIT_SSH_KEY}"
7
12
chmod 700 ~ /.ssh
8
13
chmod 600 ~ /.ssh/id_rsa
9
14
cd ~ /unipipe
10
- git config --global user.email $GIT_USER_EMAIL
11
- git config --global user.name $GIT_USER_NAME
12
- git clone $GIT_REMOTE $REPO_NAME
15
+ git config --global user.email " $GIT_USER_EMAIL "
16
+ git config --global user.name " $GIT_USER_NAME "
17
+ git clone " $GIT_REMOTE " " $REPO_NAME "
13
18
fi
14
19
15
20
cd $REPO_DIR
You can’t perform that action at this time.
0 commit comments