Skip to content

Commit 1433c1e

Browse files
authored
K8s additional checks 26 11 (DefectDojo#3363)
* Commenting branches * Check for errors * Returning branches again * Fix: indent Co-authored-by: Dubravko Sever <[email protected]>
1 parent 3d4d6a1 commit 1433c1e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/k8s-testing.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: k8s deployment
22
on:
33
pull_request_target:
44
push:
5-
branches:
6-
- master
7-
- dev
8-
- release/**
9-
- hotfix/**
5+
branches:
6+
- master
7+
- dev
8+
- release/**
9+
- hotfix/**
1010

1111
env:
1212
DD_DOCKER_REPO: defectdojo
@@ -214,4 +214,14 @@ jobs:
214214
echo "ERROR: cannot display login screen; got HTTP code $CR"
215215
exit 1
216216
fi
217+
echo "Final Check of components"
218+
errors=`kubectl get pods | grep Error | awk '{print $1}'`
219+
if [[ ! -z $errors ]]; then
220+
echo "Few pods with errors"
221+
for line in $errors; do
222+
echo "Dumping log from $line"
223+
kubectl logs --tail 50 $line
224+
done
225+
exit 1
226+
fi
217227
echo "DD K8S successfully deployed"

0 commit comments

Comments
 (0)