Skip to content

Commit

Permalink
feat(tests): use gha groups to group terminal output
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandoataoldotcom authored Oct 14, 2023
1 parent dd193f0 commit 11d730f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ set -e

./destroy-aws.sh

echo "::group::Deploying Kubernetes"
echo "Terraform Init"
terraform init
echo "Terraform Plan"
terraform plan
echo "Terraform Apply"
terraform apply -auto-approve
echo "::endgroup::"
echo "::group::Configuring Kubernetes"
echo "Authenticate with Kubernetes"
aws eks update-kubeconfig --region us-west-2 --name captain-cluster --role-arn arn:aws:iam::761182885829:role/glueops-captain
echo "Delete AWS CNI"
Expand All @@ -18,16 +21,23 @@ echo "Install Calico CNI"
helm repo add projectcalico https://docs.tigera.io/calico/charts
helm repo update
helm install calico projectcalico/tigera-operator --version v3.26.1 --namespace tigera-operator -f calico.yaml --create-namespace
echo "::endgroup::"
echo "::group::Deploying new Node Pool"
echo "Deploy node pool"
sed -i 's/#//g' main.tf
terraform apply -auto-approve
echo "Get nodes and pods from kubernetes"
kubectl get nodes
kubectl get pods -A -o=wide
echo "Start Test Suite"
echo "::endgroup::"
echo "::group::Start Test Suite"
echo ""
./k8s-test.sh
echo "Test Suite Complete"
echo "::endgroup::"
echo "::group::Tear down Environment"
echo "Terraform Destroy"
terraform destroy -auto-approve

./destroy-aws.sh
echo "::endgroup::"

0 comments on commit 11d730f

Please sign in to comment.