-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing the test environment destruction function (#421)
- Loading branch information
1 parent
18c2af2
commit 7b529b3
Showing
1 changed file
with
2 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,20 @@ | ||
#!/bin/bash | ||
|
||
function destroyEnvironment { | ||
cd "/shared/$CLUSTER_NAME/terraform" | ||
terraform init | ||
terraform destroy -auto-approve | ||
} | ||
|
||
echo "Starting Epiphany build for cluster $CLUSTER_NAME" | ||
|
||
epicli apply -f "/shared/$CLUSTER_NAME/$CLUSTER_NAME.yml" | ||
|
||
status=$? | ||
|
||
if [[ $status -eq 0 ]] | ||
if [[ $? -eq 0 ]] | ||
then | ||
echo | ||
echo "Epiphany build for cluster $CLUSTER_NAME completed successfully" | ||
echo | ||
echo "Serverspec tests for cluster $CLUSTER_NAME started..." | ||
rake inventory="/shared/$CLUSTER_NAME/inventory" user=$ADMIN_USERNAME keypath=$KEY_PATH spec:all | ||
echo "Serverspec tests for cluster $CLUSTER_NAME finished" | ||
destroyEnvironment | ||
echo | ||
else | ||
echo | ||
echo "Epiphany build for cluster $CLUSTER_NAME FAILED!" | ||
destroyEnvironment | ||
echo | ||
exit 1 | ||
fi |