aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-11-24 12:59:09 +0000
committerChristopher Baines <mail@cbaines.net>2019-11-24 20:18:08 +0000
commit5663235048b7341b378634d083eaae9f13580e07 (patch)
treea714cd2c593517faaca2b01f754646ebc9ae7d41 /scripts
parent0ffd8caeeb8a0713300ed90bbcad1775078db0af (diff)
downloaddata-service-5663235048b7341b378634d083eaae9f13580e07.tar
data-service-5663235048b7341b378634d083eaae9f13580e07.tar.gz
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-data-service-query-build-servers.in1
-rw-r--r--scripts/guix-data-service.in10
2 files changed, 10 insertions, 1 deletions
diff --git a/scripts/guix-data-service-query-build-servers.in b/scripts/guix-data-service-query-build-servers.in
index b0b3cd0..2662c89 100644
--- a/scripts/guix-data-service-query-build-servers.in
+++ b/scripts/guix-data-service-query-build-servers.in
@@ -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"
diff --git a/scripts/guix-data-service.in b/scripts/guix-data-service.in
index e8b35b5..d91b659 100644
--- a/scripts/guix-data-service.in
+++ b/scripts/guix-data-service.in
@@ -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)))