Rework the builds and build_status tables as well as related code

Allow for build status information to be submitted by POST request. This
required some changes to the builds and build_status tables, as for example,
the Cuirass build id may not be available, and the derivation may not be know
yet, so just record the derivation file name.
This commit is contained in:
Christopher Baines 2019-11-24 12:59:09 +00:00
parent 0ffd8caeeb
commit 5663235048
16 changed files with 510 additions and 229 deletions

View file

@ -23,6 +23,7 @@
(use-modules (srfi srfi-1)
(srfi srfi-37)
(squee)
(guix-data-service database)
(guix-data-service builds))
(with-postgresql-connection "query-build-servers"

View file

@ -25,6 +25,7 @@
(use-modules (srfi srfi-1)
(srfi srfi-37)
(ice-9 textual-ports)
(system repl server)
(guix-data-service config)
(guix-data-service web server))
@ -49,6 +50,12 @@
(alist-cons 'pid-file
arg
result)))
(option '("secret-key-base-file") #t #f
(lambda (opt name arg result)
(alist-cons 'secret-key-base
(string-trim-right
(call-with-input-file arg get-string-all))
result)))
(option '("update-database") #f #f
(lambda (opt name _ result)
(alist-cons 'update-database #t result)))
@ -123,4 +130,5 @@
(assq-ref opts 'port))
(start-guix-data-service-web-server (assq-ref opts 'port)
(assq-ref opts 'host)))
(assq-ref opts 'host)
(assq-ref opts 'secret-key-base)))