Aggiornamento file yaml per l aggiunta di report e l invio di un file log
All checks were successful
Punisher CI/CD Final Monitor / build-and-test (push) Successful in 29s
All checks were successful
Punisher CI/CD Final Monitor / build-and-test (push) Successful in 29s
This commit is contained in:
@@ -18,20 +18,22 @@ jobs:
|
|||||||
run: make build
|
run: make build
|
||||||
|
|
||||||
- name: Analisi Valgrind e Sandbox
|
- name: Analisi Valgrind e Sandbox
|
||||||
# Eseguiamo il codice e Valgrind salva tutto in v_report.txt
|
# Usiamo 'tee' per vedere i log sia su Gitea che nel file
|
||||||
run: |
|
run: |
|
||||||
valgrind --leak-check=full --log-file=v_report.txt ./lab_app > output.log 2>&1 || true
|
valgrind --leak-check=full --log-file=v_report.txt ./lab_app 2>&1 | tee output.log || true
|
||||||
|
|
||||||
- name: Spedizione Report a n8n
|
- name: Spedizione Report a n8n
|
||||||
if: always() # Spedisce anche se il programma crasha
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
# Creiamo il file di report unico
|
|
||||||
echo "--- LOG PROGRAMMA ---" > final.txt
|
echo "--- LOG PROGRAMMA ---" > final.txt
|
||||||
cat output.log >> final.txt
|
cat output.log >> final.txt
|
||||||
echo -e "\n\n--- ANALISI MEMORIA VALGRIND ---" >> final.txt
|
echo -e "\n\n--- ANALISI MEMORIA VALGRIND ---" >> final.txt
|
||||||
cat v_report.txt >> final.txt
|
cat v_report.txt >> final.txt
|
||||||
|
|
||||||
# Codifica Base64 e invio all'URL di produzione
|
# Creiamo un file JSON temporaneo per evitare errori di caratteri speciali
|
||||||
|
JOBS_LOG=$(cat final.txt | base64 -w 0)
|
||||||
|
echo "{\"log\":\"$JOBS_LOG\"}" > payload.json
|
||||||
|
|
||||||
curl -X POST -H "Content-Type: application/json" \
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
-d "{\"log\":\"$(cat final.txt | base64 -w 0)\"}" \
|
-d @payload.json \
|
||||||
https://n8n.thepunisher-lab.duckdns.org/webhook/punisher-logs
|
https://n8n.thepunisher-lab.duckdns.org/webhook/punisher-logs
|
||||||
Reference in New Issue
Block a user