Skip to content

Commit

Permalink
Helm tests: collect container logs (#6013)
Browse files Browse the repository at this point in the history
  • Loading branch information
azhavoro authored Jun 12, 2023
1 parent 5f588ed commit 5fa11c9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v3

- name: Start minikube
uses: medyagh/setup-minikube@master
uses: medyagh/setup-minikube@latest
with:
cpus: max
memory: max
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Deploy to minikube
run: |
printf "traefik:\n service:\n externalIPs:\n - $(minikube ip)\n" >> tests/values.test.yaml
printf " service:\n externalIPs:\n - $(minikube ip)\n" >> tests/values.test.yaml
cd helm-chart
helm dependency update
cd ..
Expand Down Expand Up @@ -83,3 +83,22 @@ jobs:
run: |
kubectl cp tests/mounted_file_share/images $(kubectl get pods -l component=server -o jsonpath='{.items[0].metadata.name}'):/home/django/share
pytest --timeout 30 --platform=kube -m "not with_external_services" tests/python --log-cli-level DEBUG
- name: Creating a log file from "cvat" container logs
if: failure()
env:
LOGS_DIR: "${{ github.workspace }}/rest_api_testing"
run: |
mkdir ${LOGS_DIR}
kubectl logs $(kubectl get pods -l component=server -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_server.log
kubectl logs $(kubectl get pods -l component=worker-import -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_worker_import.log
kubectl logs $(kubectl get pods -l component=worker-export -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_worker_export.log
kubectl logs $(kubectl get pods -l component=worker-webhooks -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_worker_webhooks.log
kubectl logs $(kubectl get pods -l app.kubernetes.io/name=traefik -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/traefik.log
- name: Uploading "cvat" container logs as an artifact
if: failure()
uses: actions/[email protected]
with:
name: rest_api_container_logs
path: "${{ github.workspace }}/rest_api_testing"
3 changes: 0 additions & 3 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,6 @@ ingress:
# secretName: ingress-tls-cvat

traefik:
logs:
general:
level: INFO
service:
externalIPs:
# - "192.168.49.2"
8 changes: 5 additions & 3 deletions tests/values.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ cvat:
imagePullPolicy: Never

traefik:
service:
externalIPs:
- 192.168.49.2
logs:
general:
level: DEBUG
access:
enabled: true

0 comments on commit 5fa11c9

Please sign in to comment.