aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-30 20:08:32 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-30 20:18:15 +0100
commitc3a308716bbed0206e3aa46b4377dea568219f6a (patch)
tree78871e09a99171ed3fcbd977c64693d811b6d68e
parentfdbcf3169ca7196a7da8e9ac5bdfda3d53cc3b65 (diff)
downloadbuild-coordinator-c3a308716bbed0206e3aa46b4377dea568219f6a.tar
build-coordinator-c3a308716bbed0206e3aa46b4377dea568219f6a.tar.gz
Stop if the build command fails
-rw-r--r--guix-build-coordinator/coordinator.scm2
-rw-r--r--scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in38
2 files changed, 22 insertions, 18 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index a2c961e..fd11161 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -64,7 +64,7 @@
(let ((related-derivations
(datastore-list-related-derivations-with-no-build
datastore
- (peek "DRV" (derivation-file-name derivation)))))
+ (derivation-file-name derivation))))
(for-each
(lambda (related-derivation)
(let ((related-uuid (random-v4-uuid)))
diff --git a/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in b/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in
index 0899538..815f493 100644
--- a/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in
+++ b/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in
@@ -125,23 +125,27 @@
derivations))
(define* (submit-build derivation #:key (priority 0))
- (system* "guix-build-coordinator" "build"
- ;; Currently submitting builds performs an allocation. Ideally this
- ;; would just mark the plan as dirty to avoid repeatedly
- ;; re-allocating builds. Until that point, pass this flag to skip
- ;; allocating builds.
- "--defer-allocation"
- ;; For the use case of providing substitutes, just build each
- ;; derivation once.
- "--ignore-if-build-for-derivation-exists"
- ;; The Guix Build Coordinator will automatically add builds for
- ;; inputs if the required output isn't available, but to ensure
- ;; this derivation, and all the related derivations have been built
- ;; and the outputs stored, instruct the Guix Build Coordinator to
- ;; add the builds upfront.
- "--ensure-all-related-derivations-have-builds"
- (simple-format #f "--priority=~A" priority)
- derivation))
+ (let ((exit-code
+ (system* "guix-build-coordinator" "build"
+ ;; Currently submitting builds performs an allocation. Ideally this
+ ;; would just mark the plan as dirty to avoid repeatedly
+ ;; re-allocating builds. Until that point, pass this flag to skip
+ ;; allocating builds.
+ "--defer-allocation"
+ ;; For the use case of providing substitutes, just build each
+ ;; output once.
+ "--ignore-if-build-for-derivation-exists"
+ "--ignore-if-build-for-outputs-exists"
+ ;; The Guix Build Coordinator will automatically add builds for
+ ;; inputs if the required output isn't available, but to ensure
+ ;; this derivation, and all the related derivations have been built
+ ;; and the outputs stored, instruct the Guix Build Coordinator to
+ ;; add the builds upfront.
+ "--ensure-all-related-derivations-have-builds"
+ (simple-format #f "--priority=~A" priority)
+ derivation)))
+ (unless (zero? exit-code)
+ (error "build command failed"))))
(define (submit-builds-for-revision commit)
(simple-format #t "looking at revision ~A\n" commit)