feat(cli): added commands for interacting with build logs
Some checks failed
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/docker Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful

This commit is contained in:
Jef Roosens 2022-05-07 21:50:20 +02:00
parent fa6603bd45
commit 5b016df85d
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
7 changed files with 145 additions and 11 deletions

View file

@ -12,6 +12,20 @@ pub:
exit_code int [nonull]
}
pub fn (bl &BuildLog) str() string {
mut parts := [
'id: $bl.id',
'repo id: $bl.repo_id',
'start time: $bl.start_time',
'end time: $bl.end_time',
'arch: $bl.arch',
'exit code: $bl.exit_code',
]
str := parts.join('\n')
return str
}
// get_build_logs returns all BuildLog's in the database.
pub fn (db &VieterDb) get_build_logs() []BuildLog {
res := sql db.conn {