Gitlab runner: Difference between revisions
mNo edit summary |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
== Introduction == | |||
This is the partner page to [[Gitlab]]. | |||
A Gitlab pipeline runs operations on a Gitlab Runner. These operations can include building an executable, running a test suite, pushing a docker image, etc. | |||
Once you have Gitlab installed and running you can install a Gitlab Runner. The Runner does not need to run on the same machine as Gitlab and you will need to register the Runner with Gitlab, to do this you will generate a token in Gitlab. | |||
== The state of gitlab-runner in nixpkgs == | == The state of gitlab-runner in nixpkgs == | ||
As of 20.09 NixOS comes with a revamped gitlab-runner module which provides the capabilities to set up custom to meet your needs. | As of 20.09 NixOS comes with a revamped gitlab-runner module which provides the capabilities to set up custom to meet your needs. | ||
The {{nixos:option|services.gitlab-runner.services}} documents a number of typical setups and this article gives an overview of some of the more complex setups. | The {{nixos:option|services.gitlab-runner.services}} documents a number of typical setups and this article gives an overview of some of the more complex setups. | ||
The NixOS manual [https://nixos.org/manual/nixos/unstable/#module-services-gitlab-runner gives an extensive runner example (the VM test)] which demonstrates the following features: | |||
* a <code>docker</code>-executor using <code>podman</code> and serving a containerized Nix Store daemon among all jobs. | |||
* Multiple Gitlab job container images which work with <code>nix</code>. | |||
The following examples give some motivations for the above. | |||
== Configuring a caching dockerized gitlab build runner == | == Configuring a caching dockerized gitlab build runner == | ||
With the configuration defined below a gitlab runner will be created which provides a caching docker container to run nix-build. | With the configuration defined below a gitlab runner will be created which provides a caching docker container to run nix-build. | ||