diff options
Diffstat (limited to 'guix-build-coordinator/agent.scm')
-rw-r--r-- | guix-build-coordinator/agent.scm | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index 8c038ab..cdacdaa 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -98,7 +98,10 @@ (define (process-job build) (let ((build-id (assoc-ref build "uuid")) (derivation-name (or (assoc-ref build "derivation_name") - (assoc-ref build "derivation-name")))) + (assoc-ref build "derivation-name"))) + (submit-outputs? (match (assoc build "submit_outputs") + ((_ . val) val) + (#f #t)))) ; default to submitting outputs (log-msg lgr 'INFO build-id ": setting up to build: " @@ -134,14 +137,18 @@ coordinator-interface build-id derivation-name) - ((if result - post-build-success - post-build-failure) - lgr - coordinator-interface - build-id - derivation-name - end-time))) + (if result + (post-build-success lgr + coordinator-interface + build-id + derivation-name + end-time + submit-outputs?) + (post-build-failure lgr + coordinator-interface + build-id + derivation-name + end-time)))) (begin (log-msg lgr 'INFO build-id @@ -561,7 +568,8 @@ but the guix-daemon claims it's unavailable" #:unwind? #t)) (define (post-build-success lgr coordinator-interface - build-id derivation end-time) + build-id derivation end-time + submit-outputs?) (define output-details (map (match-lambda @@ -660,12 +668,19 @@ but the guix-daemon claims it's unavailable" (derivation-output-path output) #:log (build-log-procedure lgr build-id))) - (log-msg lgr 'INFO build-id ": build successful, submitting outputs") - (for-each (match-lambda - ((output-name . output) - (submit-one-output output-name output))) - (derivation-outputs (read-derivation-from-file derivation))) + (if submit-outputs? + (begin + (log-msg lgr 'INFO build-id ": build successful, submitting outputs") + (for-each (match-lambda + ((output-name . output) + (submit-one-output output-name output))) + (derivation-outputs (read-derivation-from-file derivation))) + (log-msg lgr 'INFO build-id + ": finished submitting outputs, reporting build success")) + (begin + (log-msg lgr 'INFO build-id + ": build successful, skipping submitting outputs") + (log-msg lgr 'INFO build-id + ": reporting build success"))) - (log-msg lgr 'INFO - build-id ": finished submitting outputs, reporting build success") (attempt-submit-build-result)) |