aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Initialize libgit's TLS certificate directory once and for all.Ludovic Courtès2018-01-22
| | | | | | * src/cuirass/base.scm (prepare-git): New procedure. Body moved from... (process-specs): ... here. Remove it. * bin/cuirass.in (main): Call 'prepare-git'.
* Monitor and report build events.Ludovic Courtès2018-01-22
| | | | | | * src/cuirass/base.scm (%newline): New variable. (build-event-output-port, handle-build-event): New procedures. (build-packages): Use 'handle-build-event'.
* http: /build/N/log/raw redirects to /log.Ludovic Courtès2018-01-07
| | | | | | | | | | | This moves log handling responsibility to 'guix publish'. * src/cuirass/http.scm (handle-log-request): Remove. (url-handler): Change /log/raw URI handler to return 302 to /log/OUTPUT. * tests/http.scm (log-file-name): Remove, and remove code to create and delete it. ("fill-db"): Change #:log value. ("/build/1/log/raw"): Expect 302.
* database: Extend and test 'db-get-builds'.Ludovic Courtès2018-01-07
| | | | | | | | | | * src/cuirass/database.scm (db-get-builds): Make 'order' a separate filter. Add 'format-limit-clause'. Reverse OUTPUTS. * tests/database.scm (make-dummy-eval, make-dummy-derivation) (make-dummy-build): New procedures. (with-temporary-database): New macro. ("database"): Use 'make-dummy-build'. ("db-get-builds"): New test.
* Do not mistakenly use 'GIT_SSL_CAINFO' as a directory name.Ludovic Courtès2017-09-29
| | | | | | | | | | 'GIT_SSL_CAINFO' designates a single-file certificate bundle, not a directory; thus it must be passed as the second argument to 'set-tls-certificate-locations!'. * src/cuirass/base.scm (process-specs): Pass $SSL_CERT_DIR as the first argument to 'set-tls-certificate-locations!', and $GIT_SSL_CAINFO or $SSL_CERT_FILE as the second argument.
* cuirass: Add --listen command line option.Jan Nieuwenhuizen2017-09-18
| | | | | | | | * bin/cuirass.in (show-help): Add help for --listen option. (%options): Add listen option. (main): Pass host to run-cuirass-server. * doc/cuirass.texi (Invocation): Add --listen option. * src/cuirass/http.scm (run-cuirass-server): Add named #:host parameter.
* base: Show feedback when build has finished.Jan Nieuwenhuizen2017-09-17
| | | | | * src/cuirass/base.scm (build-packages): Print some feedback when derivations have been built.
* base: Make working copy writable.Jan Nieuwenhuizen2017-09-17
| | | | | * src/cuirass/base.scm (copy-repository-cache): Make working copy writable. Fixes guix .po build errors.
* cuirass: add Hydra compatible HTTP API.Mathieu Othacehe2017-09-08
| | | | | | | | | | | | | * doc/cuirass.texi (Sections)[Web API]: New section describing the HTTP API. * src/cuirass/http.scm (spec->json-string): Move it to utils.scm and rename it object->json-string. (object->json-scm): Move it utils.scm. (handle-*-request): New helpers procedures. (request-parameters): New procedure to parse a request query. (url-handler): Add new API's. * src/cuirass/utils.scm (object->json-scm, object->json-string): Exported procedures moved from http.scm. * tests/http.scm: Add various tests on new HTTP API.
* cuirass: Store new information in database to prepare new HTTP APIMathieu Othacehe2017-09-08
| | | | | | | | | | | | | | | | | | | | | integration. * bin/evaluate.in (fill-job): New procedure. (main): Use it to fill informations (nix-name, system) that will later be added to database. * doc/cuirass.texi (Database)[Derivation]: Add system and nix_name fields. (Database)[Builds]: Add id, status, timestamp, starttime and stoptime fields. Remove output field. (Database)[Outputs]: New table describing the build outputs. * src/cuirass/base.scm (build-packages): Add new fields to build object before adding it to database. * src/cuirass/database.scm (db-get-build, db-get-builds): New procedures to get a build by id from database and a list of builds using filter parameters respectively. * src/schema.sql (Outputs) : New table. (Derivations): Add system and nix_name columns. (Builds): Remove output column and add id, status, timestamp, starttime and stoptime columns.
* base: Set certificate location.Ricardo Wurmus2017-08-26
| | | | | * src/cuirass/base.scm (process-specs): Set certificate location to the value in GIT_SSL_CAINFO or SSL_CERT_DIR.
* database: 'db-add-build' is now idempotent.Ludovic Courtès2017-08-26
| | | | | | | | | | | Fixes <https://bugs.gnu.org/28094>. Reported by Ricardo Wurmus <rekado@elephly.net>. * src/cuirass/database.scm (SQLITE_CONSTRAINT) (SQLITE_CONSTRAINT_PRIMARYKEY): New variables. (db-add-build): Catch 'sqlite-error, and swallow SQLITE_CONSTRAINT_PRIMARYKEY errors. * tests/database.scm ("db-add-build"): New test.
* cuirass: Fix Guile current-processor-count deprecation warnings.Mathieu Othacehe2017-08-02
| | | | | | | | | When current-processor-count is used without (ice-9 threads) being used, Guile complains with the following warning: Import (ice-9 threads) to have access to `current-processor-count'. * src/cuirass/base.scm: Use (ice-9 threads).
* base: Report git errors.Mathieu Othacehe2017-07-31
| | | | | | | | | * src/cuirass/base.scm (report-git-error): New procedure. (with-git-error-handling): New macro. (process-specs): Use with-git-error-handling to catch and report git errors. * build-aux/guix.scm (package)[inputs]: Add guile-git. * configure.ac: Check for (git) module. Also check that (git) exports git-error-message procedure.
* base: Report evaluation error.Mathieu Othacehe2017-07-30
| | | | | | | | | * src/cuirass/base.scm (&evaluation-error): New condition type. (evaluate): Report an &evaluation-error if eof-object? is true on data read from port. Otherwise, suppose that data are correct and keep things going. (process-specs): Catch &evaluation-error, report the error in the log and keep going.
* cuirass: Add fallback parameter.Mathieu Othacehe2017-07-12
| | | | | | | | * src/cuirass/base.scm (%fallback?): New exported parameter. (process-specs)[set-build-options]: Pass fallback parameter. * bin/cuirass.in (%options): Add fallback. (main): Set %fallback? parameter. (show-help): Update.
* database: Fix typo.Mathieu Othacehe2017-07-12
| | | | | | * src/cuirass/database.scm (db-get-stamp, db-add-stamp): Replace #:id by #:name. There is no #:id in specifications. Plus, the primary key of Specifications is #:name.
* base: Fix time-monotonic Guile issue.Mathieu Othacehe2017-07-12
| | | | | * src/cuirass/base.scm: Replace time-monotonic with time-tai with Guile 2.2, to avoid wrong evaluation durations.
* cuirass: Stop λ/lambda mixing.Mathieu Othacehe2017-07-06
| | | | | | | | | | | | | * bin/cuirass.in: Replace λ by lambda. * bin/evaluate.in: Ditto. * build-aux/guix.scm: Ditto. * examples/gnu-system.scm: Ditto. * examples/guix-track-git.scm: Ditto. * src/cuirass.scm: Ditto. * src/cuirass/base.scm: Ditto. * src/cuirass/database.scm: Ditto. * src/cuirass/ui.scm: Ditto. * src/cuirass/utils.scm: Remove λ* macro.
* repo: Remove dead code.Mathieu Othacehe2017-07-06
| | | | | | | | * Makefile.am (dist_pkgmodule_DATA): Remove repo.scm, (TESTS): Remove repo.scm. * build-aux/guix.scm (package)[disable-repo-tests]: Remove phase. * src/cuirass/repo.scm: Remove. * tests/repo.scm: Remove.
* base: Use (guix git) module.Mathieu Othacehe2017-07-05
| | | | | | | | | | * src/cuirass/base.scm (copy-repository-cache) : New procedure. (fetch-repository): Use latest-repository-commit to fetch git repository instead of raw git system commands. (process-specs): Use fetch-repository to get a store directory containing the repository described in SPEC, add copy it to cache with "copy-repository-cache". * configure.ac: Check (guix git) module presence.
* utils: Remove useless procedures.Mathieu Othacehe2017-07-01
| | | | | | | | | | | * src/cuirass/utils.scm (mkdir-p, make-user-module, call-with-temporary-directory, with-directory-excursion): Remove because already defined in guix. * tests/utils (with-directory-excursion): Remove associated test. * src/cuirass/base.scm: Use (guix build utils) to provide procedure removed from (cuirass utils). * bin/evaluate.in: Ditto. * bin/cuirass.in: Use "make-user-module" provided by (guix ui).
* repo: remove git-repo.Mathieu Othacehe2017-07-01
| | | | | | | * src/cuirass/repo.scm (git-repo): Remove it. * tests/repo.scm: Remove related tests. git-repo is not used and it's usecases will be covered by (guix git).
* base: Send build output to the bit bucket.Ludovic Courtès2017-06-04
| | | | | | | | | Fixes a regression introduced in a42cf16fec114c26d16d5153053a2c6a1a3b1d11 whereby build logs would go the Cuirass' stderr. * src/cuirass/base.scm (build-packages): Parameterize 'current-build-output-port' to a void output port.
* base: Provide 'build-derivations' with the full list of derivations.Ludovic Courtès2017-02-24
| | | | | | | | | | This improves parallelism when 'max-jobs' is large. * src/cuirass/base.scm (build-packages): Rewrite to pass the complete list of derivations to 'build-derivations' at once. Handle multiple outputs. * src/schema.sql (Builds): Make "output" part of the primary key. Co-authored-by: Mathieu Lirzin <mthl@gnu.org>
* base: Remove unnecessary 'file-exists?' call.Ludovic Courtès2017-02-24
| | | | | * src/cuirass/base.scm (fetch-repository): Remove 'file-exists?' call before 'mkdir-p'.
* base: Do not stop on the first build failure.Ludovic Courtès2017-02-24
| | | | | * src/cuirass/base.scm (process-specs): Systematically call 'set-build-options'. Pass #:keep-going? #t.
* base: Handle multi-directories in load-path.Mathieu Othacehe2017-02-06
| | | | | | | * src/cuirass/base.scm (set-guix-package-path!): Parse colon separated directories in load-path. Co-authored-by: Mathieu Lirzin <mthl@gnu.org>
* base: Handle 'git clone' errors correctly.Mathieu Othacehe2017-01-29
| | | | | | | | | Fixes https://notabug.org/mthl/cuirass/issues/1. * src/cuirass/base.scm (fetch-repository): Return #f when 'git clone' fails. (process-specs): Test if commit is not #f before using its value. Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
* cuirass: Add "--load-path" option.Mathieu Othacehe2017-01-29
| | | | | | | | | | | | * bin/cuirass.in (%options): Add "--load-path" and "-L" command line options. (show-help): Adapt. * src/cuirass/base.scm (%guix-package-path): New parameter. (set-guix-package-path!): New procedure. (evaluate): Call "evaluate" script with '%guix-package-path'. * bin/evaluate.in (main): Match 'guix-package-path' command line argument and handle it. Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
* database: db-add-derivation: Don't try to add a derivation twice.Mathieu Lirzin2017-01-09
| | | | | | | | | This fixes the issue of having multiple identical derivations associated with an evaluation as reported by Ludovic Courtès <ludo@gnu.org> at <https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00109.html>. * src/cuirass/database.scm (db-add-derivation): Ignore if JOB is already present in DB.
* maint: Add new mailing list and webpage.Mathieu Lirzin2017-01-09
| | | | | | * configure.ac: Declare <bug-cuirass@framalistes.org> as package mailing list, and <https://notabug.org/mthl/cuirass/> as package website. * src/cuirass/ui.scm (show-package-information): Display them.
* cuirass: Add "--port" command line option.Mathieu Lirzin2016-12-28
| | | | | | | | * bin/cuirass.in (%options): Add "--port" and "-p" command line options. (show-help): Adapt. (main): Set default to 8080. Call 'run-cuirass-server' with this. * src/cuirass/http.scm (run-cuirass-server): Display the port number. * doc/cuirass.texi (Invocation): Document new option.
* http: Add 'port' keyword argument to 'run-cuirass-server'.Mathieu Lirzin2016-12-28
| | | | * src/cuirass/http.scm (run-cuirass-server): Add 'port' keyword argument.
* config: Remove references to '$prefix' expansion hack.Mathieu Lirzin2016-12-28
| | | | | * src/cuirass/config.scm.in (%datadir, %localstatedir): Don't refer to previous '$prefix' expansion hack in comments.
* repo: Add <repo> record datatype.Mathieu Lirzin2016-12-28
| | | | | | | * src/cuirass/utils.scm (call-with-temporary-directory): New procedure. * src/cuirass/repo.scm: Use it. New file. * tests/repo.scm: New tests. * Makefile.am (dist_pkgmodule_DATA, TESTS): Add them.
* base: Create the parent directories of '%package-cachedir'.Mathieu Lirzin2016-12-01
| | | | | * src/cuirass/base.scm (fetch-repository): Use 'mkdir-p' instead of 'mkdir' for 'cachedirectory'.
* base: Use inner definitions instead of big anonymous procedures.Mathieu Lirzin2016-11-17
| | | | | * src/cuirass/base.scm (build-packages, process-specs): Use an inner definition instead of a big anonymous procedure.
* db: Forbid inserting the same specification twice.Mathieu Lirzin2016-11-17
| | | | | | | | * src/schema.sql (Specifications): Make 'repo_name' the primary key. (Stamps, Evaluations): Adapt. * src/cuirass/database.scm (db-get-specifications): Likewise. (db-add-specification): Ignore if SPEC has already been added. * tests/database.scm (example-spec): Adapt.
* build: Let 'make' generate 'src/cuirass/config.scm'.Mathieu Lirzin2016-11-12
| | | | | | | | | | | | | * Makefile.am (src/cuirass/config.scm, $(go_files)): New targets. (do_subst, generate_file, go_files): New variables. (EXTRA_DIST): Distribute 'src/cuirass/config.scm.in'. (DISTCLEANFILES): Rename to ... (MOSTLYCLEANFILES): ... this. * configure.ac (AC_CONFIG_FILES): Remove 'src/cuirass/config.scm'. (@expanded_datadir@, @expanded_localstatedir@): Delete. (AC_PROG_MKDIR_P, AC_PROG_SED): Use them. * src/cuirass/config.scm (%datadir): Set it to $(localstatedir). (%localstatdir): Set it to $(datadir).
* cuirass: Run HTTP server.Mathieu Lirzin2016-11-03
| | | | | | * src/cuirass.scm: Re-export (cuirass http) module. * bin/cuirass.in (main): Run HTTP server and move the 'process-specs' loop in another thread.
* http: Add DB argument to 'url-handler'.Mathieu Lirzin2016-11-03
| | | | | | * src/cuirass/http.scm (not-found): Delete. (url-handler): Add DB argument. (run-cuirass-server): Likewise. Pass it to 'run-server' STATE argument.
* base: Handle build failure.Jan Nieuwenhuizen2016-09-23
| | | | | | | * src/cuirass/base.scm (build-packages): Catch build failures, write error log and update database. Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
* base: Support tracking of a Guix package's git.Jan Nieuwenhuizen2016-09-23
| | | | | | | | | | * src/schema.sql (Specifications): Add no_compile_p column. * src/cuirass/database.scm (db-add-specification) (db-get-specifications): Handle #:no-compile? property. * tests/database.scm (example-spec): Adapt. * src/cuirass/base.scm (process-specs): Skip compilation if #:no-compile?. Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
* cuirass: Optionally support using of substitutes.Jan Nieuwenhuizen2016-09-23
| | | | | | | | * bin/cuirass.in (options): Add --use-substitutes. (show-help): Idem. (main): Set %use-substitutes?. Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
* Add (cuirass) module.Mathieu Lirzin2016-08-02
| | | | | | | | | | * src/cuirass.scm: New file. * Makefile.am (guilesitedir, dist_guilesite_DATA) (nodist_guilesite_DATA): New variables. (pkgmoduledir): Refer to 'guilesitedir'. (CLEANFILES): Add 'nodist_guilesite_DATA'. * bin/cuirass.in: Use (cuirass) module. * bin/evaluate.in: Likewise.
* Add (cuirass http) module.Mathieu Lirzin2016-07-31
| | | | | | | * src/cuirass/http.scm: New file. * tests/http.scm: Likewise. * Makefile.am (dist_pkgmodule_DATA, TESTS): Add them. * configure.ac: Check for (json) module.
* utils: Add 'alist?' procedure.Mathieu Lirzin2016-07-30
| | | | | * src/cuirass/utils.scm (alist?): New procedure. * tests/utils.scm ("alist?"): New test.
* schema: Evaluations: Add 'revision' column.Mathieu Lirzin2016-07-30
| | | | | | * src/schema.sql (Evaluations): Add 'revision' column. * src/cuirass/database.scm (db-add-evaluation): Adapt. All callers changed.
* schema: Builds: Add 'evaluation' column.Mathieu Lirzin2016-07-27
| | | | | | * src/schema.sql (Builds): Add 'evaluation' column. * src/cuirass/database.scm (db-add-build): Adapt. * src/cuirass/base.scm (build-packages): Likewise.