mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 18:20:07 +01:00
Squashed commit of the following: commit 86eadd3ec42b7bce0dc5716d65798af95d0d8cbc Author: technofab <admin@technofab.de> Date: Fri May 2 17:10:33 2025 +0200 docs(README): fix built with nix badge commit f50057da69e89974f17bc37b5e140b2ef9f817f6 Author: technofab <admin@technofab.de> Date: Fri May 2 16:09:00 2025 +0200 ci: change back rule so docs only get deployed on main commit ce02b043f4bd83c36285e5620e71701fc3bcc998 Author: technofab <admin@technofab.de> Date: Fri May 2 16:08:10 2025 +0200 docs: write docs and improve formatter etc. commit e996b23cf877d8021759b782aa5996f5e2bf12ac Author: technofab <admin@technofab.de> Date: Fri May 2 16:07:56 2025 +0200 docs: update README commit 650f97b5608c32cf6cf66cc3fdd0965dc42e4860 Author: technofab <admin@technofab.de> Date: Wed Apr 23 21:05:14 2025 +0200 docs: add favicon commit 67e1bfecbcaf0b8f7dad2eecfaccf774cc560874 Author: technofab <admin@technofab.de> Date: Wed Apr 23 20:53:44 2025 +0200 docs: initial setup
41 lines
1.4 KiB
Markdown
41 lines
1.4 KiB
Markdown
# CI/CD Component
|
|
|
|
The CI/CD Component has some inputs which configure defaults for Nix GitLab CI.
|
|
|
|
## `version`
|
|
|
|
- Type: `string`
|
|
|
|
Which version of the Nix CI image to use. Using a tag/version is recommended.
|
|
Will not do anything if a custom image is specified using `NIX_CI_IMAGE`.
|
|
|
|
## `cache_strategy`
|
|
|
|
- Type: `string`
|
|
- Default: `"auto"`
|
|
- Options: `auto` | `none` | `runner` | `cachix` | `attic`
|
|
|
|
Sets the default caching strategy.
|
|
|
|
- `auto`: dynamically selects the best strategy for every job based on env variables
|
|
- `none`: disables caching
|
|
- `runner`, `cachix` & `attic`: forces every job to use this strategy
|
|
|
|
Can be overridden by `NIX_CI_CACHE_STRATEGY`, see [Environment Variables](./environment_variables.md).
|
|
|
|
## `cache_files`
|
|
|
|
- Type: `array` (of strings)
|
|
- Default: `["flake.nix", "flake.lock"]`
|
|
|
|
Files to use as the cache key for the generated pipeline yaml.
|
|
If you use a file like `ci.nix` to define CI, add that here for example.
|
|
This makes sure that changes to your Nix CI configuration will invalidate the cache,
|
|
otherwise an old pipeline yaml might be used.
|
|
|
|
!!! warning
|
|
|
|
The value of this is used in `cache:key:files`, which currently only supports
|
|
a max of 2 entries. So use something like `["flake.*", "ci.nix"]` to match
|
|
`flake.lock`, `flake.nix` and `ci.nix`.
|
|
See [gitlab-org/gitlab#301161](https://gitlab.com/gitlab-org/gitlab/-/issues/301161)
|