aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-qa-frontpage/git-repository.scm15
-rw-r--r--scripts/guix-qa-frontpage.in36
2 files changed, 30 insertions, 21 deletions
diff --git a/guix-qa-frontpage/git-repository.scm b/guix-qa-frontpage/git-repository.scm
index 6a6297c..2b0a17a 100644
--- a/guix-qa-frontpage/git-repository.scm
+++ b/guix-qa-frontpage/git-repository.scm
@@ -12,7 +12,9 @@
#:use-module (git structs)
#:use-module (guix build utils)
#:use-module ((guix build utils) #:select (with-directory-excursion))
- #:export (ensure-repository-exists!
+ #:export (%git-repository-location
+
+ ensure-repository-exists!
update-repository!
with-bare-git-repository
with-git-worktree
@@ -21,18 +23,21 @@
get-git-branch-head-committer-date))
-(define* (guix.git-excursion thunk #:optional (dir "guix.git"))
+(define %git-repository-location
+ (make-parameter #f))
+
+(define* (guix.git-excursion thunk #:optional dir)
(monitor
- (with-directory-excursion dir
+ (with-directory-excursion (or dir (%git-repository-location))
(thunk))))
(define (ensure-repository-exists!)
(monitor
- (unless (file-exists? "guix.git")
+ (unless (file-exists? (%git-repository-location))
(invoke "git" "clone"
"--bare"
"https://git.savannah.gnu.org/git/guix.git"
- "guix.git")
+ (%git-repository-location))
(guix.git-excursion
(lambda ()
diff --git a/scripts/guix-qa-frontpage.in b/scripts/guix-qa-frontpage.in
index e405c39..7c4e42e 100644
--- a/scripts/guix-qa-frontpage.in
+++ b/scripts/guix-qa-frontpage.in
@@ -34,6 +34,7 @@
(prometheus)
(guix-qa-frontpage database)
(guix-qa-frontpage manage-builds)
+ (guix-qa-frontpage git-repository)
(guix-qa-frontpage manage-patch-branches)
(guix-qa-frontpage server))
@@ -118,22 +119,25 @@
(setup-database (assq-ref opts 'database)
metrics-registry)))
- (start-refresh-data-thread database)
+ (parameterize
+ ((%git-repository-location (string-append (getcwd) "/guix.git")))
- (when (assq-ref opts 'submit-builds)
- (start-submit-patch-builds-thread database
- "http://127.0.0.1:8746"
- "https://data.qa.guix.gnu.org")
- (start-submit-branch-builds-thread database
- "http://127.0.0.1:8746"
- "https://data.qa.guix.gnu.org"))
+ (start-refresh-data-thread database)
- (when (assq-ref opts 'manage-patch-branches)
- (start-manage-patch-branches-thread))
+ (when (assq-ref opts 'submit-builds)
+ (start-submit-patch-builds-thread database
+ "http://127.0.0.1:8746"
+ "https://data.qa.guix.gnu.org")
+ (start-submit-branch-builds-thread database
+ "http://127.0.0.1:8746"
+ "https://data.qa.guix.gnu.org"))
- (start-guix-qa-frontpage-web-server
- (assq-ref opts 'port)
- (assq-ref opts 'host)
- (assq-ref opts 'assets-directory)
- database
- metrics-registry)))
+ (when (assq-ref opts 'manage-patch-branches)
+ (start-manage-patch-branches-thread))
+
+ (start-guix-qa-frontpage-web-server
+ (assq-ref opts 'port)
+ (assq-ref opts 'host)
+ (assq-ref opts 'assets-directory)
+ database
+ metrics-registry))))