Skip to content

Commit

Permalink
Always collect & upload logs from docker containers during CI
Browse files Browse the repository at this point in the history
useful for debugging
  • Loading branch information
atodorov committed Oct 25, 2023
1 parent f57353f commit 0961496
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,23 @@ jobs:
name: kc-json-files
path: ./*.json

- name: Collect docker logs
if: always() && matrix.command == 'docker-image'
run: |
docker logs keycloak_server > keyclock_server.log
docker logs openldap_server > openldap_server.log
docker logs web > kiwitcms.log
docker logs db > database.log
- name: Upload logs
if: always() && matrix.command == 'docker-image'
uses: actions/upload-artifact@v3
with:
name: docker-logs
path: ./*.log

- name: Sanity test - shut down the docker image
if: matrix.command == 'docker-image'
if: always() && matrix.command == 'docker-image'
run: |
docker kill keycloak_server
docker-compose -f docker-compose.testing down

0 comments on commit 0961496

Please sign in to comment.