summary refs log tree commit diff
path: root/nixos/modules/services/continuous-integration
Commit message (Collapse)AuthorAge
* modules/github-runner: Improve description of `url`Profpatsch2022-03-11
| | | | | | | | | | | | | | We spent a whole afternoon debugging this, because upstream has very bad software quality and the error messages were incredibly misleading. So let’s document it for the sanity of other people. Btw, I think the implementation of our module is pretty brittle, especially the part about diffing tokens to check whether they changed. We should rather just request a new builder registration every time, it’s not that much overhead, and always set `replace` so it is idempotent.
* nixos/github-runner: use `--disableupdate` flagVincent Haupert2022-01-28
| | | | Use the new `--disableupdate` configure flag instead of our patch.
* nixos/nix-daemon: use structural settingspolykernel2022-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `nix.*` options, apart from options for setting up the daemon itself, currently provide a lot of setting mappings for the Nix daemon configuration. The scope of the mapping yields convience, but the line where an option is considered essential is blurry. For instance, the `extra-sandbox-paths` mapping is provided without its primary consumer, and the corresponding `sandbox-paths` option is also not mapped. The current system increases the maintenance burden as maintainers have to closely follow upstream changes. In this case, there are two state versions of Nix which have to be maintained collectively, with different options avaliable. This commit aims to following the standard outlined in RFC 42[1] to implement a structural setting pattern. The Nix configuration is encoded at its core as key-value pairs which maps nicely to attribute sets, making it feasible to express in the Nix language itself. Some existing options are kept such as `buildMachines` and `registry` which present a simplified interface to managing the respective settings. The interface is exposed as `nix.settings`. Legacy configurations are mapped to their corresponding options under `nix.settings` for backwards compatibility. Various options settings in other nixos modules and relevant tests have been updated to use structural setting for consistency. The generation and validation of the configration file has been modified to use `writeTextFile` instead of `runCommand` for clarity. Note that validation is now mandatory as strict checking of options has been pushed down to the derivation level due to freeformType consuming unmatched options. Furthermore, validation can not occur when cross-compiling due to current limitations. A new option `publicHostKey` was added to the `buildMachines` submodule corresponding to the base64 encoded public host key settings exposed in the builder syntax. The build machine generation was subsequently rewritten to use `concatStringsSep` for better performance by grouping concatenations. [1] - https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md
* Merge pull request #148785 from pennae/more-option-doc-staticizingGraham Christensen2021-12-17
|\ | | | | treewide: more defaultText for options
| * treewide: add defaultText for options with simple interpolation defaultspennae2021-12-09
| | | | | | | | | | | | adds defaultText for all options that use `cfg.*` values in their defaults, but only for interpolations with no extra processing (other than toString where necessary)
* | Merge pull request #148164 from veehaitch/nixos-github-runner-148024-v2Bobby Rong2021-12-17
|\ \ | | | | | | nixos/github-runner: refactor tokens handling
| * | nixos/github-runner: refactor tokens handlingVincent Haupert2021-12-01
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes how we deal with the current token, i.e., the token which may exist from a previous runner registration, and the configured token, i.e., the path set for the respective NixOS configuration option. Until now, we copied the configured and the current token (if any) to the runtime directory to compare them. The path of the current token may reference a file which is only accessible to specific users (even only root). Therefore, we ran the copying of credentials with elevated privileges by prefixing the `ExecStartPre=` script with a `+` (see systemd.service(5)). In this script, we also changed the owner of the files to the service user. Apparently, however, the user/group pair sometimes did not exist because we use `DynamicUser=`. To address this issue, we no longer change the owner of the file. Instead, we change the file permissions to 0666 to allow the runner configuration script (runs with full sandboxing) to read-write the file. Due to the current permissions of the runtime directory (0755), this would expose the token. Therefore, we process the tokens in the state directory, which is only accessible to the service user. If a new token file exists in the state directory, the configuration script should trigger a new runner registration. Afterward, it deletes the new token file. The token is still available using the path of the current token which is inaccessible within the service's sandbox.
* / nixos/*: add trivial defaultText for options with simple defaultspennae2021-12-02
|/
* nixos/hercules-ci-agent: Update moduleRobert Hensing2021-11-19
|
* nixos/doc: clean up defaults and examplesNaïm Favier2021-10-04
|
* github-runner: Allow configuring the package to use (#134661)Andreas Fuchs2021-08-24
| | | | | | This addresses #120263 in part, by allowing users to override the github-runner derivation that is bound to turn non-functional via the self-update mechanism. (And it'll allow using a buildFHSUserEnv-based derivation, if someone ends up building that!)
* treewide: Port type adaptationsDaniel Nagy2021-08-11
|
* Merge pull request #111768 from misuzu/gitlab-runner-warningsPascal Bach2021-08-02
|\ | | | | nixos/gitlab-runner: warn about possible secrets leak
| * nixos/gitlab-runner: warn about possible secrets leakmisuzu2021-02-03
| |
* | treewide: convert phases that contain ":" to dont* = true (#130500)Sandro2021-07-18
| |
* | Merge pull request #121841 from Pamplemousse/jenkins-cliFranz Pletz2021-07-06
|\ \ | | | | | | jenkins: Create the `jenkins-cli` command
| * | nixos/modules/jenkins: Add option to add CLIPamplemousse2021-06-14
| | | | | | | | | | | | Signed-off-by: Pamplemousse <xav.maso@gmail.com>
* | | nixos/jenkins-job-builder: add support for folder jobsBjørn Forsman2021-06-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for folder jobs (https://plugins.jenkins.io/cloudbees-folder/) by reworking the service to support nested jobs. This also fixes this deprecation warning (as a happy side effect): WARNING:jenkins_jobs.cli.subcommand.test:(Deprecated) The default output behavior of `jenkins-jobs test` when given the --output flag will change in JJB 3.0. Instead of writing jobs to OUTPUT/jobname; they will be written to OUTPUT/jobname/config.xml. The new behavior can be enabled by the passing `--config-xml` parameter
* | | Merge pull request #121667 from Mic92/buildkiteJörg Thalheim2021-06-01
|\ \ \ | | | | | | | | nixos/buildkite-agents: fix race-condition when installing secrets
| * | | nixos/buildkite-agents: fix race-condition when installing secretsJörg Thalheim2021-05-05
| | | |
* | | | treewide: remove nand0p as maintainerMartin Weinelt2021-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While looking at the sphinx package I noticed it was heavily undermaintained, which is when we noticed nand0p has been inactive for roughly 18 months. It is therefore prudent to assume they will not be maintaining their packages, modules and tests. - Their last contribution to nixpkgs was in 2019/12 - On 2021/05/08 I wrote them an email to the address listed in the maintainer-list, which they didn't reply to.
* | | | nixos/hercules-ci-agent: Set default labelsRobert Hensing2021-05-04
| | | |
* | | | nixos/hercules-ci-agent: Set default concurrency to autoRobert Hensing2021-05-04
|/ / /
* | | services.buildkite-agents: support multi-tagsViktor Kronvall2021-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The buildkite agent supports multiple tags with the same key. This functionality is used to have a [single agent listen on multiple queues](https://buildkite.com/docs/agent/v3/queues#setting-an-agents-queue). However, having the tags be of type `attrsOf str` means that we cannot suport this use case. This commit modifies the type of tags to be `attrsOf (either str (listOf str))` where the list is expanded into multiple tags with the same key. Example: ``` {tags = {queue = ["default", "testing"];};} ``` generates ``` tags="queue=default,queue=testing" ``` in the buildkite agent configuration.
* | | nixos/github-runner: init at v2.277.1 (#116775)Vincent Haupert2021-04-10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * github-runner: init at 2.277.1 * nixos/github-runner: initial version * nixos/github-runner: add warning if tokenFile in Nix store * github-runner: don't accept unexpected attrs * github-runner: formatting nits * github-runner: add pre and post hooks to checkPhase * nixos/github-runner: update ExecStartPre= comment * nixos/github-runner: adapt tokenFile option description Also note that not only a change to the option value will trigger a reconfiguration but also modifications to the file's content. * nixos/github-runner: remove mkDefault for DynamicUser= * nixos/github-runner: create a parent for systemd dirs Adds a parent directory "github-runner/" to all of the systemd lifecycle directories StateDirectory=, RuntimeDirectory= and LogDirectory=. Doing this has two motivations: 1. Something like this would required if we want to support multiple runners configurations. Please note that this is already possible using NixOS containers. 2. Having an additional parent directory makes it easier to remap any of the directories. Without a parent, systemd is going to complain if, for example, the given StateDirectory= is a symlink. * nixos/github-runner: use specifier to get abs runtime path * nixos/github-runner: use hostname as default for option `name` Until now, the runner registration did not set the `--name` argument if the configuration option was `null`, the default for the option. According to GitHub's documentation, this instructs the registration script to use the machine's hostname. This commit causes the registration to always pass the `--name` argument to the runner configuration script. The option now defaults to `networking.hostName` which should be always set on NixOS. This change becomes necessary as the systemd service name includes the name of the runner since fcfa809 and, hence, expects it to be set. Thus, an unset `name` option leads to an error. * nixos/github-runner: use types.str for `name` option Forcing a `name` option to comply with a pattern which could also be used as a hostname is probably not required by GitHub. * nixos/github-runner: pass dir paths explicitly for ExecStartPre= * nixos/github-runner: update variable and script naming * nixos/github-runner: let systemd choose the user/group User and group naming restrictions are a complex topic [1] that I don't even want to touch. Let systemd figure out the username and group and reference it in our scripts through the USER environment variable. [1] https://systemd.io/USER_NAMES/ * Revert "nixos/github-runner: use types.str for `name` option" The escaping applied to the subdirectory paths given to StateDirectory=, RuntimeDirectory= and LogsDirectory= apparently doesn't use the same strategy that is used to escape unit names (cf. systemd-escape(1)). This makes it unreasonably hard to construct reliable paths which work for StateDirectory=/RuntimeDirectory=/LogsDirectory= and ExecStartPre=. Against this background, I decided to (re-)apply restrictions to the name a user might give for the GitHub runner. The pattern for `networking.hostName` seems like a reasonable choice, also as its value is the default if the `name` option isn't set. This reverts commit 193ac67ba337990c22126da24a775c497dbc7e7d. * nixos/github-runner: use types.path for `tokenFile` option * nixos/github-runner: escape options used as shell arguments * nixos/github-runner: wait for network-online.target * github-runner: ignore additional online tests
* | nixos/hydra: gc-check-reachability no longer exists in nix 2.4 (#117925)Jörg Thalheim2021-03-29
| | | | | | | | | | | | | | | | | | | | | | * nixos/hydra: gc-check-reachability no longer exists in nix 2.4 fixup! nixos/hydra: gc-check-reachability no longer exists in nix 2.4 * Update nixos/modules/services/continuous-integration/hydra/default.nix Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
* | nixos/hydra: append `application_name` to HYDRA_DBICole Helbling2021-03-03
| | | | | | | | | | | | This will make it easier to track specifically where queries are being made from (assuming a `log_line_prefix` that includes `%a` in the postgres configuration).
* | Improve todoRobert Hensing2021-02-10
| |
* | nixos/hercules-ci-agent: Add myself to meta.maintainersRobert Hensing2021-02-10
| |
* | nixos/hercules-ci-agent: Improve concurrentTasks option docRobert Hensing2021-02-10
| |
* | nixos/hercules-ci-agent: Format with nixpkgs-fmtRobert Hensing2021-02-10
| |
* | nixos/hercules-ci-agent: Remove patchNixRobert Hensing2021-02-06
|/
* nixos/buildbot: fix type for pythonPackagesBen Wolsieffer2021-01-31
| | | | | The pythonPackages option is a function that returns a list of packages, but the type was specified as just a list of packages.
* nixos/buildbot: add lopsided98 as maintainerBen Wolsieffer2021-01-31
|
* Merge pull request #111125 from helsinki-systems/gocd-agentSandro2021-01-30
|\ | | | | nixos/gocd-agent nixos/gocd-server: add types
| * nixos/gocd-agent nixos/gocd-server: add typesScriptkiddi2021-01-29
| |
* | Don't `createHome` for the `hydra` user (#110722)Gabriel Gonzalez2021-01-29
|/ | | Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
* nixos/gitlab-runner: add support for 'docker+machine' and ↵misuzu2021-01-26
| | | | 'docker-ssh+machine' executors (#108763)
* nixos/buildbot: add pythonPackages typeFritz Otlinghaus2021-01-24
|
* utillinux: rename to util-linuxGraham Christensen2020-11-24
|
* nixos/modules: fix systemd start rate-limitslf-2020-10-31
| | | | | | | | | | | | | | | | These were broken since 2016: https://github.com/systemd/systemd/commit/f0367da7d1a61ad698a55d17b5c28ddce0dc265a since StartLimitIntervalSec got moved into [Unit] from [Service]. StartLimitBurst has also been moved accordingly, so let's fix that one too. NixOS systems have been producing logs such as: /nix/store/wf98r55aszi1bkmln1lvdbp7znsfr70i-unit-caddy.service/caddy.service:31: Unknown key name 'StartLimitIntervalSec' in section 'Service', ignoring. I have also removed some unnecessary duplication in units disabling rate limiting since setting either interval or burst to zero disables it (https://github.com/systemd/systemd/blob/ad16158c10dfc3258831a9ff2f1a988214f51653/src/basic/ratelimit.c#L16)
* nixos/hydra: remove hydra-migration upgrade pathMaximilian Bosch2020-10-21
| | | | | | | | | This should NOT be backported to 20.09! When 21.03 is released, the DB changes are about a year old and operators had two release cycles for the upgrade. At this point it should be fair to remove the compat layer to reduce the complexity of the module itself.
* nixos/jenkins: switch to openjdk11 as openjdk14 is not supportedAugustin Borsu2020-10-04
|
* nixos/hercules-ci-agent: initRobert Hensing2020-08-23
|
* nixos/gitlab-runner: add clone-url option (#93894)Milan2020-07-30
|
* nixos/buildbot: enable configurable keepalive for buildbot workerRoman Sharapov2020-07-13
| | | | | | | | | | | | | | In the current implementation, there's no possibility to modify the default parameter for keepalive. This is a number that indicates how frequently keepalive messages should be sent from the worker to the buildmaster, expressed in seconds. The default (600) causes a message to be sent to the buildmaster at least once every 10 minutes. If the worker is behind a NAT box or stateful firewall, these messages may help to keep the connection alive: some NAT boxes tend to forget about a connection if it has not been used in a while. When this happens, the buildmaster will think that the worker has disappeared, and builds will time out. Meanwhile the worker will not realize than anything is wrong.
* nixos/gitlab-runner: add more global options (#86946)misuzu2020-06-29
|
* nixos/buildbot-master: support reporters, migrate away from statusFlorian Klink2020-06-18
| | | | | | | | | | | Since Buildbot 0.9.0, status targets were deprecated and ignored. There's a very small line on startup explaining that, and status simply isn't reported. Avoid others the same headaches, and do it right in the NixOS module. As there might have been changes in the way reporters are organized, and configuration might need to be migrated remove the old option, and not just provide an alias.
* nixos/buildbot-master: fix typo in services.buildbot-master.bpPortFlorian Klink2020-06-05
| | | | | | It's pbPort, and it's also a connection string, meaning listen-on-localhost is also possible. Provide an alias for the old option name, so old configs still work.
* nixos/gitlab-runner: support multiple servicesmisuzu2020-05-02
|