mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
docs: add remaining docs back with some additions/improvements
This commit is contained in:
parent
f147295418
commit
0bd75fd1bb
12 changed files with 538 additions and 1 deletions
41
docs/cicd_component.md
Normal file
41
docs/cicd_component.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue