diff options
Diffstat (limited to 'guix-build-coordinator/agent-messaging/http.scm')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http.scm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm index 9448201..cdb0451 100644 --- a/guix-build-coordinator/agent-messaging/http.scm +++ b/guix-build-coordinator/agent-messaging/http.scm @@ -52,6 +52,7 @@ submit-status submit-log-file submit-build-result + report-build-start report-setup-failure submit-output fetch-builds-for-agent)) @@ -323,6 +324,19 @@ port. Also, the port used can be changed by passing the --port option.\n" (render-json '(("error" . "access denied")) #:code 403)))) + (('POST "build" uuid "report-build-start") + (let ((agent-id-for-build + (datastore-agent-for-build datastore uuid))) + (if (authenticated? agent-id-for-build request) + (begin + (handle-build-start-report datastore + agent-id-for-build + uuid) + (render-json + "message received")) + (render-json + '(("error" . "access denied")) + #:code 403)))) (('POST "build" uuid "report-setup-failure") (let ((agent-id-for-build (datastore-agent-for-build datastore uuid))) @@ -695,6 +709,13 @@ port. Also, the port used can be changed by passing the --port option.\n" #:method 'PUT ; TODO Should be PATCH #:body result)) +(define (report-build-start coordinator-uri agent-uuid password + build-id) + (coordinator-http-request + coordinator-uri agent-uuid password + (string-append "/build/" build-id "/report-build-start") + #:method 'POST)) + (define (report-setup-failure coordinator-uri agent-uuid password build-id report) (coordinator-http-request |