From 98437160f97225aeadcc5b1a2fd093d5f6ad6036 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 19 Feb 2021 11:22:43 -0300 Subject: vps.scm: Remove generage-ci-html --- vps.scm | 99 ----------------------------------------------------------------- 1 file changed, 99 deletions(-) (limited to 'vps.scm') diff --git a/vps.scm b/vps.scm index d0700ff..7fccbf6 100644 --- a/vps.scm +++ b/vps.scm @@ -168,90 +168,6 @@ (define ci-domain (string-append ci-domain-prefix "." tld)) -;; CI HTML generation from Git notes - -(define ci-html-beginning #" - - - - - - - - - -

- Build logs -

"#) - -(define ci-html-ending - " -") - -(define git-data-path "/srv/git") -(define ci-data-path "/srv/ci") - -(define (ci-data-in-repo-notes name path) - (utils:with-directory-excursion path - (let* ((out-list (-> #´git notes list´ - (string-fun:string-replace-substring "\n" " ") - (string-split #\space))) - (relevant-commits (->> (srfi-1:zip out-list (iota (length out-list))) - (filter (compose odd? srfi-1:second)) - (map srfi-1:first)))) - (map (lambda (commit) - (let ((data (-> #´git notes --ref=refs/notes/ci-data show $commit´ - (string-split #\space))) - (logs #´git notes --ref=refs/notes/ci-logs show $commit´) - (href (format #f - "https://~a/~a/blob?id=~a" - git-domain - name - #´git notes --ref=refs/notes/ci-logs list $commit´))) - (list (cons #:status (srfi-1:first data)) - (cons #:filename (srfi-1:second data)) - (cons #:logs logs) - (cons #:href href)))) - relevant-commits)))) - -(define (generate-html-for-project name) - (string-append - "

- - " name " - -

- ")) - -(define (generate-ci-html) - (call-with-output-file (string-append ci-data-path "/index.html") - (partial display - (string-append ci-html-beginning - (apply string-append - (map generate-html-for-project - (list-directory git-data-path))) - ci-html-ending)))) - - ;; OS configuration (define sudoers "\ @@ -298,17 +214,6 @@ pki " mail-domain " key \"" (tls-priv-for mail-domain) "\""))) tls-prefixes) (map (cut string-append <> "." tld) static-projects)))) -(define generate-ci-html-job - #~(job "*/5 * * * *" - #$(program-file - "generate-ci-html.scm" - (with-imported-modules (modules:source-module-closure - '((guix build utils))) - #~(begin - (use-modules (guix build utils)) - (display 'generate-ci-html)))))) - - (define (static-nginx-config domains root) (nginx-server-configuration (server-name domains) @@ -358,10 +263,6 @@ pki " mail-domain " key \"" (tls-priv-for mail-domain) "\""))) (password-authentication? #false) (authorized-keys `((,user ,(local-file "id_rsa.pub")))))) - #; - (service mcron-service-type - (mcron-configuration - (jobs (list generate-ci-html-job)))) (simple-service 'automatic-services-restart activation-service-type (with-imported-modules '((gnu services herd)) -- cgit v1.2.3