Skip to content

Commit

Permalink
Removing the test environment destruction function (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslavic authored Aug 6, 2019
1 parent 18c2af2 commit 7b529b3
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions core/src/epicli/tests/docker/test-ci-epicli/run.sh
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

0 comments on commit 7b529b3

Please sign in to comment.