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 1477623 commit b983a6b
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() and matrix.command == 'docker-image'
run: |
docker kill keycloak_server
docker-compose -f docker-compose.testing down

0 comments on commit b983a6b

Please sign in to comment.