mirror of https://github.com/MISP/MISP
Merge branch 'develop' into 2.4
commit
da937092a7
|
@ -279,9 +279,15 @@ jobs:
|
|||
|
||||
- name: Logs
|
||||
if: ${{ always() }}
|
||||
# update logs_test.sh when adding more logsources here
|
||||
run: |
|
||||
tail -n +1 `pwd`/app/tmp/logs/*
|
||||
tail -n +1 /var/log/apache2/*.log
|
||||
|
||||
sudo -u $USER app/Console/cake Log export /tmp/logs.json.gz --without-changes
|
||||
zcat /tmp/logs.json.gz
|
||||
|
||||
- name: Errors in Logs
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
./tests/logs_tests.sh
|
|
@ -1 +1 @@
|
|||
{"major":2, "minor":4, "hotfix":180}
|
||||
{"major":2, "minor":4, "hotfix":181}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
# This file contains regexes applied to logs, one line per regex
|
||||
# Whenever the regex matches, the Logs job will fail and report the error.
|
||||
class="cake-error"
|
||||
Error: [ParseError]
|
||||
Error: [PDOException]
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
ERROR_MESSAGE="Errors found in logs !"
|
||||
# exit 0 of grep = match found, so we need to exit 1 on this use-case.
|
||||
grep -HE -f logs_fail_regexes.txt `pwd`/app/tmp/logs/* && echo $ERROR_MESSAGE && exit 1
|
||||
grep -HE -f logs_fail_regexes.txt /var/log/apache2/*.log && echo $ERROR_MESSAGE && exit 1
|
||||
zgrep -HE -f logs_fail_regexes.txt /tmp/logs.json.gz && echo $ERROR_MESSAGE && exit 1
|
||||
# exit cleanly because grep found nothing, and did exit 1.
|
||||
exit 0
|
Loading…
Reference in New Issue