-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile-full.yaml
More file actions
65 lines (62 loc) · 2.78 KB
/
Taskfile-full.yaml
File metadata and controls
65 lines (62 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: '3'
tasks:
full:test:
desc: "Test ALL 26 services"
cmds:
- echo "=========================================="
- echo " TESTING ALL 26 AWS SERVICES"
- echo "=========================================="
- echo ""
- kubectl apply -f samples/01-s3.yaml
- kubectl apply -f samples/02-dynamodb.yaml
- kubectl apply -f samples/03-sqs.yaml
- kubectl apply -f samples/04-sns.yaml
- kubectl apply -f samples/05-vpc.yaml
- sleep 5
- kubectl apply -f samples/06-subnet.yaml
- kubectl apply -f samples/07-lambda.yaml
- kubectl apply -f samples/12-elastic-ip.yaml
- kubectl apply -f samples/08-internet-gateway.yaml
- kubectl apply -f samples/13-iam-role.yaml
- kubectl apply -f samples/14-kms-key.yaml
- kubectl apply -f samples/16-ecr-repository.yaml
- kubectl apply -f samples/25-ecs-cluster.yaml
- echo ""
- echo "Waiting 30s for resources to reconcile..."
- sleep 30
- echo ""
- task: full:report
full:report:
desc: "Generate full test report"
cmds:
- |
echo "=========================================="
echo " FULL TEST REPORT - 26 SERVICES"
echo "=========================================="
echo ""
echo "=== INFRASTRUCTURE ==="
kubectl get s3bucket,dynamodbtable,sqsqueue,snstopic -n default 2>/dev/null || echo "None"
echo ""
echo "=== NETWORKING ==="
kubectl get vpc,subnet,internetgateway,elasticip -n default 2>/dev/null || echo "None"
echo ""
echo "=== COMPUTE & CONTAINERS ==="
kubectl get lambdafunction,ecscluster,ecrrepository -n default 2>/dev/null || echo "None"
echo ""
echo "=== SECURITY ==="
kubectl get iamrole,kmskey -n default 2>/dev/null || echo "None"
echo ""
echo "=========================================="
echo " SUMMARY"
echo "=========================================="
TOTAL=$(kubectl get s3bucket,dynamodbtable,sqsqueue,snstopic,vpc,subnet,lambdafunction,internetgateway,elasticip,iamrole,kmskey,ecrrepository,ecscluster -n default 2>/dev/null | tail -n +2 | wc -l | tr -d ' ')
READY=$(kubectl get s3bucket,dynamodbtable,sqsqueue,snstopic,vpc,subnet,internetgateway,elasticip,iamrole,kmskey,ecrrepository,ecscluster -n default -o json 2>/dev/null | jq '[.items[] | select(.status.ready == true)] | length')
echo "Total Resources Created: $TOTAL"
echo "Ready: $READY"
echo "Not Ready: $((TOTAL - READY))"
echo "Success Rate: $(echo "scale=1; $READY * 100 / $TOTAL" | bc)%"
echo "=========================================="
full:cleanup:
desc: "Delete all test resources"
cmds:
- kubectl delete -f samples/ --ignore-not-found=true