From 88603040bb59e7f53b9cd079d25d5f1499808f78 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 31 Oct 2022 00:13:15 +0530 Subject: Import (guix build utils) in after scripts of CI jobs. * genenetwork-development.scm (genenetwork-projects): Import (guix build utils) in after scripts of CI jobs. --- genenetwork-development.scm | 50 +++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/genenetwork-development.scm b/genenetwork-development.scm index b5c1cb4..3d88bed 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -216,18 +216,19 @@ command to be executed." "-c" "-m" "pytest"))) ;; If unit tests pass, redeploy genenetwork2 and ;; trigger Mechanical Rob. - (after #~(begin - (use-modules (guix build utils)) - (when (string=? (getenv "RESULT") "success") - ;; We cannot refer to sudo in the - ;; store since that sudo does not have - ;; the setuid bit set. See "(guix) - ;; Setuid Programs". - (invoke "/run/setuid-programs/sudo" - #$(file-append shepherd "/bin/herd") - "restart" "genenetwork2") - (invoke #$(file-append laminar "/bin/laminarc") - "queue" "genenetwork2-mechanical-rob"))))) + (after (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (when (string=? (getenv "RESULT") "success") + ;; We cannot refer to sudo in the + ;; store since that sudo does not have + ;; the setuid bit set. See "(guix) + ;; Setuid Programs". + (invoke "/run/setuid-programs/sudo" + #$(file-append shepherd "/bin/herd") + "restart" "genenetwork2") + (invoke #$(file-append laminar "/bin/laminarc") + "queue" "genenetwork2-mechanical-rob")))))) (forge-laminar-job (name "genenetwork2-mechanical-rob") (run (genenetwork2-tests @@ -249,18 +250,19 @@ command to be executed." #:guix-daemon-uri %guix-daemon-uri)) ;; If unit tests pass, redeploy genenetwork3 and ;; trigger genenetwork2 tests. - (after #~(begin - (use-modules (guix build utils)) - (when (string=? (getenv "RESULT") "success") - ;; We cannot refer to sudo in the - ;; store since that sudo does not have - ;; the setuid bit set. See "(guix) - ;; Setuid Programs". - (invoke "/run/setuid-programs/sudo" - #$(file-append shepherd "/bin/herd") - "restart" "genenetwork3") - (invoke #$(file-append laminar "/bin/laminarc") - "queue" "genenetwork2"))))) + (after (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (when (string=? (getenv "RESULT") "success") + ;; We cannot refer to sudo in the + ;; store since that sudo does not have + ;; the setuid bit set. See "(guix) + ;; Setuid Programs". + (invoke "/run/setuid-programs/sudo" + #$(file-append shepherd "/bin/herd") + "restart" "genenetwork3") + (invoke #$(file-append laminar "/bin/laminarc") + "queue" "genenetwork2")))))) (forge-laminar-job (name "genenetwork3-pylint") (run (derivation-job-gexp -- cgit v1.2.3