Commit graph

954 commits

Author SHA1 Message Date
Eelco Dolstra 02888105a8
Add a hydra.conf option to enable email notification
Note that it's disabled by default.
2018-03-12 14:04:23 +01:00
Philipp Hausmann 3cf2ffe367 [ Fix #531 ] Trim github pr plugin store paths.
nix-store --add returns a trailing LF which caused wrong include
paths for the github PR plugin JSON input.
2018-02-12 17:59:56 +01:00
Eelco Dolstra fd463ff403
Remove nix-install-package support
'nix-install-package' no longer exists in Nix 1.12.

Closes #268.
2018-01-15 14:27:58 +01:00
Graham Christensen 83a48d2d4f
Add a restart-jobs role
Frequently users want Hydra access just to restart jobs. However,
prior to this commit the only way to grant that access was by giving
them full Admin access which isn't necessarily what we want to do.

By having a restart-jobs role, we can grant this privilege to users
who are known to the community and want to help, but aren't long-time
members.

I haven't tested this commit, but it looks good to me...
2017-12-30 08:28:23 -05:00
Eelco Dolstra 8913c682cf
Doh 2017-12-25 15:02:17 +01:00
Eelco Dolstra 7ccec0900b Fix links to steps in the machines page 2017-12-07 16:20:23 +01:00
Eelco Dolstra e9670641ec
Distinguish build step states
The web interface now shows whether a build step is connecting,
copying inputs/outputs, building, etc.
2017-12-07 15:35:31 +01:00
Eelco Dolstra b7bc4384b7
Fix serving plain text files 2017-11-21 17:55:52 +01:00
Eelco Dolstra 7857f83251
Serve directories and symlinks correctly 2017-11-14 17:17:07 +01:00
Eelco Dolstra 100249c066
Use git rev-list --count 2017-11-14 16:18:54 +01:00
Eelco Dolstra d8d71ea4a3 hydra-server: Use server_store_uri instead of store_uri, if set
The store_uri may contain parameters that cause Nix to fail when
running under the hydra-server user (e.g. the signing key).
2017-10-18 15:33:55 +02:00
Eelco Dolstra 62c6cca937
Make one-click installs work for binary cache stores
This requires setting binary_cache_public_uri in hydra.conf.
2017-10-18 14:09:28 +02:00
Eelco Dolstra 44ef743d84
Hide some things that require a local store 2017-10-18 13:44:41 +02:00
Eelco Dolstra 30943dd217
Detect MIME type 2017-10-18 13:38:34 +02:00
Eelco Dolstra 42fbde0383
Use "nix cat-store" to serve files from the Nix store
This makes downloading/viewing build results work with binary cache
stores. For good performance, this should be used in conjunction with
ca580bec35,
i.e. you should set store_uri to something like

  s3://my-cache?local-nar-cache=/tmp/nar-cache

to cache NARs between requests.
2017-10-18 12:48:31 +02:00
Eelco Dolstra bc60fccf78
Remove remaining references to store_mode etc. 2017-10-18 12:23:07 +02:00
Rob Vermaas b645b03536
Fix string comparison 2017-09-25 11:54:55 +00:00
Rob Vermaas 2318baaade
Add 'readonly_ips' option, to allow readonly access for certain IPs when 'private' option is enabled. 2017-09-22 11:36:49 +00:00
Eelco Dolstra d676c91bd5
Return Builds.drvpath in the JSON API
E.g.

  curl -H 'Accept: application/json' http://127.0.0.4/build/3772858 | jq -r .drvpath
  /nix/store/97vla79lavlcsk8milskr06rfm34bskx-patchelf-0.8pre843_f4522f4.drv
2017-09-12 18:42:18 +02:00
Shea Levy a6d9201947 GithubStatus: Allow config to specify the integration description and context 2017-07-24 15:44:10 -04:00
Eelco Dolstra 064fd20b6f Merge pull request #494 from Chakerbh/master
Use build id for bitbucket Key
2017-07-11 17:41:22 +02:00
Chaker Benhamed c5666095a1 Use build id for bitbucket Key 2017-07-11 16:13:56 +01:00
Eelco Dolstra f95516a82b Merge pull request #466 from cyraxjoe/configurable-git-input
Allow to configure the timeout value for the GitInput plugin in different places.
2017-07-07 11:03:06 +02:00
Chaker Benhamed 8da3ca6e94 Skip the input if the emailResponsible field is disabled 2017-07-05 15:51:20 +01:00
Chaker Benhamed fd8cb39a11 Add BitBucket plugin
This plugin will post to the build status system in BitBucket. In order
to use it you need to add to ExtraConfig
<bitbucket>
username = bitbucket_username
password = bitbucket_password
</bitbucket>
You can use an application password https://blog.bitbucket.org/2016/06/06/app-passwords-bitbucket-cloud/
2017-07-04 10:07:25 +01:00
Shea Levy 207d2dd10c GithubStatus: Don't send a pending status for already-finished builds
Fixes #488
2017-06-21 14:51:09 -04:00
michael bishop 6e4a7a30f7
fix github pulls json to be deterministic 2017-06-21 09:35:26 -03:00
Shea Levy 582c399420 Add buildQueued plugin hook 2017-05-24 09:45:31 -04:00
Shea Levy 3d044d2ec2 Github status API: Pull authorization from github_authorization by default 2017-05-24 08:53:29 -04:00
Shea Levy 08708e899a GithubPulls: Add 'revision' to the input 2017-05-24 07:33:06 -04:00
Shea Levy c6f0753435 Add GithubPulls input plugin.
This can be used with declarative projects to build PRs.

The github_authorization section should contain verbatim Authorization header contents keyed by repo owner for private repos
2017-05-24 05:31:27 -04:00
Eelco Dolstra 941665044e
/api/scmdiff: Set correct MIME type
It was set to application/json but should be text/plain.
2017-05-05 15:58:38 +02:00
Joel Rivera a39ffba042 Include the project and jobset names in the configuration blocks
to set the timeout for a specific input in the GitInput plugin.

Remove the comments about using inputs with spaces.
2017-04-28 21:43:35 -05:00
Shea Levy 86aa851d8d Merge branch 'circleci-plugin' 2017-04-24 11:28:09 -04:00
Shea Levy 4c26cf0c81 getHydraConfig: Allow multiple includes 2017-04-20 08:00:09 -04:00
Shea Levy f4b4ee5751 Add CircleCI plugin. 2017-04-19 15:20:09 -04:00
Joel Rivera af2f8122e3 Allow to configure the timeout value for the GitInput plugin in different places.
1. From the hydra configuration file.

    The configuration is loaded from the "git-input" block.
    Currently only the "timeout" variable is been looked up in the file.

    <git-input>
      # general timeout
      timeout = 400
      <input-name>
        # specific timeout for a particular input name
        timeout = 400
      </input-name>

      # use quotes when the input name has spaces
      <"foot with spaces">
        # specific timeout for a particular input name
        timeout = 400
      </"foo with spaces">
    </git-input>

2. As an argument in the input value after the repo url and branch (and after the deepClone if is defined)
   "timeout=<value>"

The preference on which value is used:

 1. input value
 2. Block with the name of the input in the <git-input> block
 3. "timeout" inside the <git-input> block
 4. Default value of 600 seconds. (original hard-coded value)

The code is generalized for more values to be configured, it might be too much
for a single value on a single plugin.
2017-04-13 19:10:53 -05:00
Eelco Dolstra c2c2633e50
Fix link to cached build log
Fixes #462.
2017-04-11 14:25:48 +02:00
Eelco Dolstra 433b94ee68
Fix Mercurial diff
It only showed the log messages of $rev1 and $rev2. Now it shows the
range $rev1::$rev2, excluding $rev1.
2017-04-11 13:39:54 +02:00
Shea Levy 7e3f12fe10 Merge branch 'decl-project-remote-store' 2017-04-10 11:36:41 -04:00
Eelco Dolstra fec895a642
hydra-server: Support logs in S3 2017-04-05 17:55:56 +02:00
Shea Levy a738f826e8 declarative projects: Pull jobset spec build from the remote store
Fixes #443
2017-04-01 10:38:49 -04:00
Will Dietz 90870f1416 NixExprs.pm: encode default.nix as utf-8 to fix missing chars/data. (#455)
cc #254
2017-04-01 11:18:51 +02:00
Eelco Dolstra 7e6486e694
Move log compression to a plugin 2017-03-15 16:59:57 +01:00
Eelco Dolstra 285754aff6
hydra-evaluator improvements
* The "Jobset" page now shows when evaluations are in progress (rather
  than just pending).

* Restored the ability to do a single evaluation from the command line
  by doing "hydra-evaluator <project> <jobset>".

* Fix some consistency issues between jobset status in PostgreSQL and
  in hydra-evaluator. In particular, "lastCheckedTime" was never
  updated internally.
2017-03-15 16:59:57 +01:00
Rob Vermaas fd754d678e
Do not trigger eval on jobset change when check interval is 0 (disabled). 2017-02-23 09:15:26 +00:00
Eelco Dolstra 9f6afb3375
Lock paths in the scm cache
This is necessary now that hydra-evaluator runs multiple evaluations
in parallel, to prevent corruption of Git/Mercurial clones.
2017-02-21 18:12:52 +01:00
Eelco Dolstra 81ac547d2b
Move most of AddBuilds to hydra-eval-jobset
Having this stuff in a separate module is a remnant of the time when
hydra-server could add builds to the queue directly. This is no longer
the case.
2017-02-21 17:20:48 +01:00
Eelco Dolstra f6081668dc
Allow determinism checking for entire jobsets
Setting

  xxx-jobset-repeats = patchelf:master:2

will cause Hydra to perform every build step in the specified jobset 2
additional times (i.e. 3 times in total). Non-determinism is not fatal
unless the derivation has the attribute "isDeterministic = true"; we
just note the lack of determinism in the Hydra database. This will
allow us to get stats about the (lack of) reproducibility of all of
Nixpkgs.
2016-12-07 15:57:13 +01:00
Eelco Dolstra d0ad3fd806
Revert "Remove the global channel"
This reverts commit 2f6c2f5622.

This unintentionally also removed /all, which is actually somewhat
useful.
2016-12-06 14:25:09 +01:00