Fix file yaml
All checks were successful
Punisher CI/CD Final Monitor / build-and-test (push) Successful in 25s
All checks were successful
Punisher CI/CD Final Monitor / build-and-test (push) Successful in 25s
This commit is contained in:
@@ -6,39 +6,35 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
options: --memory=128mb --cpus=0.5 # Limite di sicurezza VPS
|
options: --memory=128mb --cpus=0.5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout del codice
|
- name: Checkout del codice
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup SOC Tools
|
- name: Setup Tools
|
||||||
run: apt-get update && apt-get install -y build-essential valgrind curl
|
run: apt-get update && apt-get install -y build-essential valgrind curl
|
||||||
|
|
||||||
- name: Compilazione Professionale
|
- name: Compilazione
|
||||||
run: make build
|
run: make build
|
||||||
|
|
||||||
- name: Analisi Valgrind e Sandbox
|
- name: Analisi Valgrind
|
||||||
run: |
|
run: |
|
||||||
# Usiamo 'tee' per vedere i log sia su Gitea che nel file
|
|
||||||
valgrind --leak-check=full --log-file=v_report.txt ./lab_app 2>&1 | tee output.log || 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
|
||||||
if: always()
|
if: always()
|
||||||
continue-on-error: true # Se n8n non risponde, il job Gitea risulterà comunque VERDE se il codice è OK
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
|
# Creazione report
|
||||||
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 ---" >> final.txt
|
||||||
cat v_report.txt >> final.txt
|
cat v_report.txt >> final.txt
|
||||||
|
|
||||||
JOBS_LOG=$(cat final.txt | base64 -w 0)
|
# Trasformazione in Base64
|
||||||
echo "{\"log\":\"$JOBS_LOG\"}" > payload.json
|
REPORT_B64=$(cat final.txt | base64 -w 0)
|
||||||
|
|
||||||
# TENTATIVO 1: URL Pubblico (DuckDNS)
|
# Invio a n8n (Usa l'IP locale per evitare errori DuckDNS)
|
||||||
# TENTATIVO 2: IP Locale del Docker Bridge (se il primo fallisce)
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
curl -sS -X POST -H "Content-Type: application/json" \
|
-d "{\"log\":\"$REPORT_B64\"}" \
|
||||||
-d @payload.json \
|
|
||||||
https://n8n.thepunisher-lab.duckdns.org/webhook/punisher-logs || \
|
|
||||||
curl -sS -X POST -H "Content-Type: application/json" \
|
|
||||||
-d @payload.json \
|
|
||||||
http://172.17.0.1:5678/webhook/punisher-logs
|
http://172.17.0.1:5678/webhook/punisher-logs
|
||||||
Reference in New Issue
Block a user