Cum să urmărești log-urile unui build Concourse cu Fly CLI
DodaTech
Updated 2025-01-15
1 min read
In this tutorial, you'll learn about Cum să urmărești log. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.
Comanda fly watch afișează log-urile unui build Concourse în terminal, în timp real, permițând monitorizarea execuției.
Urmărire build în timp real
fly -t main watch \
-p nume-pipeline \
-j build
Output așteptat:
Cloning repository...
Fetching dependencies...
Running tests...
✓ test_authentication
✓ test_api_endpoint
✓ test_database
All tests passed
Urmărire build specific
fly -t main watch \
-p nume-pipeline \
-j build \
-b 42
Urmărire cu trigger
fly -t main trigger-job \
-p nume-pipeline \
-j deploy \
-w
Steagul -w de la trigger-job rulează implicit watch după trigger.
Filtrare pe task-uri
fly -t main watch \
-p nume-pipeline \
-j build \
-s compile
Afișează numai log-urile task-ului compile din job-ul build.
Salvarea log-urilor în fișier
fly -t main watch \
-p nume-pipeline \
-j test \
> build-log.txt 2>&1
Urmărire cu format JSON
fly -t main watch \
-p nume-pipeline \
-j test \
--json
Output:
{"time":"2025-01-15T10:00:00Z","task":"test","message":"Executing tests..."}
{"time":"2025-01-15T10:00:05Z","task":"test","message":"Tests passed"}
Prevenire
- Rulează
watchîntr-un terminal separat pentru monitorizare - Salvează log-urile pentru audit și depanare ulterioară
- Folosește
-spentru a filtra task-uri specifice în job-uri complexe - Combină
trigger-job -wpentru flux complet declanșare + monitorizare
Greșeli comune
- Watch pe build finalizat -- log-urile sunt disponibile, dar nu în timp real
- Redirect fără 2>&1 -- erorile nu sunt capturate în fișier
- Task greșit în
-s-- nu se afișează nimic dacă numele task-ului este incorect
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. DodaTech monitors all CI builds in real-time with fly watch.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro