diff options
| author | Alex Kost <alezost@gmail.com> | 2018-08-18 22:45:41 +0300 |
|---|---|---|
| committer | Alex Kost <alezost@gmail.com> | 2018-08-26 00:06:26 +0300 |
| commit | 126374fd328e66299beee5875f7ea5437302f340 (patch) | |
| tree | 16df5bc6a1c57b4dfb44ccb8da6a93ecbf2107ed /build-farm-url.el | |
| parent | url: Use nil for 'json-false' value (diff) | |
| download | emacs-build-farm-126374fd328e66299beee5875f7ea5437302f340.tar.gz | |
Rename 'jobset' interface to 'hydra-jobset'
Cuirass and Hydra jobsets are completely different, so there will be a
separate interface for Cuirass jobsets.
* build-farm.el: Update Emacs requirement to 24.4 because 'subr-x'
library is needed now.
(build-farm-info-insert-jobset): Rename to...
(build-farm-info-insert-hydra-jobset): ... this.
* build-farm-build.el (build-farm-build-info-insert-jobset): Adjust
accordingly.
* build-farm-project.el (build-farm-project-info-insert-jobset): Likewise.
* build-farm-url.el (build-farm-jobset-api-url): Rename to...
(build-farm-hydra-jobset-api-url): ... this.
* build-farm-jobset.el: Rename 'jobset' to 'hydra-jobset' everywhere.
Diffstat (limited to 'build-farm-url.el')
| -rw-r--r-- | build-farm-url.el | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/build-farm-url.el b/build-farm-url.el index 909be4c..b45ae81 100644 --- a/build-farm-url.el +++ b/build-farm-url.el @@ -26,6 +26,7 @@ (require 'url-expand) (require 'json) (require 'build-farm-utils) +(eval-when-compile (require 'subr-x)) (defvar build-farm-url-alist '(("https://hydra.nixos.org" . hydra) @@ -150,17 +151,25 @@ See function `build-farm-url' for the meaning of ROOT-URL." :root-url root-url)) (cl-defun build-farm-jobset-url (&key root-url project jobset jobset-id) - "Return URL of a PROJECT's JOBSET. -Above that, you should specify either a single JOBSET-ID + "Return URL of a build farm JOBSET. + +For Cuirass farm, you should not use PROJECT, so you can specify +either JOBSET or JOBSET-ID. + +For Hydra farm, you should specify either a single JOBSET-ID argument (it should have a form 'project/jobset') or PROJECT and JOBSET arguments. + See function `build-farm-url' for the meaning of ROOT-URL." (build-farm-url root-url "/jobset/" - (or jobset-id - (concat project "/" jobset)))) + (if project + (concat project "/" jobset) + ;; JOBSET-ID for Cuirass contains leading "/". + (or (string-trim-left jobset-id "/") + jobset)))) -(cl-defun build-farm-jobset-api-url (project &key root-url) - "Return API URL for jobsets by PROJECT. +(cl-defun build-farm-hydra-jobset-api-url (project &key root-url) + "Return API URL for Hydra jobsets by PROJECT. See function `build-farm-url' for the meaning of ROOT-URL." (build-farm-api-url "jobsets" |
