-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Helm tests: collect container logs (#6013)
- Loading branch information
Showing
3 changed files
with
26 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 .. | ||
|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters