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 23s
All checks were successful
Punisher CI/CD Final Monitor / build-and-test (push) Successful in 23s
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Punisher CI/CD Full Monitor
|
name: Punisher CI/CD Final Monitor
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -6,32 +6,32 @@ 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
|
options: --memory=128mb --cpus=0.5 # Limite di sicurezza VPS
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout del codice
|
- name: Checkout del codice
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Installazione Tool SOC
|
- name: Setup SOC 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
|
- name: Compilazione Professionale
|
||||||
run: make build
|
run: make build
|
||||||
|
|
||||||
- name: Esecuzione Sandbox con Valgrind
|
- name: Analisi Valgrind e Sandbox
|
||||||
# Eseguiamo e salviamo tutto in un file
|
# Eseguiamo il codice e Valgrind salva tutto in v_report.txt
|
||||||
run: |
|
run: |
|
||||||
valgrind --leak-check=full --log-file=v_report.txt ./lab_app > app_output.log 2>&1 || true
|
valgrind --leak-check=full --log-file=v_report.txt ./lab_app > output.log 2>&1 || true
|
||||||
|
|
||||||
- name: Invio Report Finale
|
- name: Spedizione Report a n8n
|
||||||
if: always()
|
if: always() # Spedisce anche se il programma crasha
|
||||||
run: |
|
run: |
|
||||||
# Uniamo i log in un unico report leggibile
|
# Creiamo il file di report unico
|
||||||
echo "--- OUTPUT PROGRAMMA ---" > final.txt
|
echo "--- LOG PROGRAMMA ---" > final.txt
|
||||||
cat app_output.log >> final.txt
|
cat output.log >> final.txt
|
||||||
echo -e "\n\n--- ANALISI VALGRIND ---" >> final.txt
|
echo -e "\n\n--- ANALISI MEMORIA VALGRIND ---" >> final.txt
|
||||||
cat v_report.txt >> final.txt
|
cat v_report.txt >> final.txt
|
||||||
|
|
||||||
# Spediamo tutto codificato a n8n
|
# Codifica Base64 e invio all'URL di produzione
|
||||||
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 "{\"log\":\"$(cat final.txt | base64 -w 0)\"}" \
|
||||||
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