mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
107 lines
5.4 KiB
Markdown
107 lines
5.4 KiB
Markdown
# Environment Variables
|
|
|
|
Nix GitLab CI is mostly controlled using environment variables.
|
|
This page outlines all the variables and their use case.
|
|
|
|
## `NIX_CI_IMAGE`
|
|
|
|
| | |
|
|
| ----------- | -------------------------------------------------------------------------- |
|
|
| Default | `registry.gitlab.com/technofab/nix-gitlab-ci/nix-ci@$[[ inputs.version ]]` |
|
|
| Description | Image to use for the jobs |
|
|
|
|
## `NIX_CI_PIPELINE_NAME`
|
|
|
|
| | |
|
|
| ----------- | ------------------------------------------------- |
|
|
| Default | N/A |
|
|
| Description | Explicitly request a pipeline to be built and ran |
|
|
| See also | [Multi Pipeline](./multi_pipeline.md) |
|
|
|
|
## `NIX_CI_DEFAULT_SOURCES`
|
|
|
|
| | |
|
|
| ----------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
| Default | `.*` |
|
|
| Description | Regex to match `$CI_PIPELINE_SOURCE` against. If it matches, the `default` pipeline will be ran, otherwise `$CI_PIPELINE_SOURCE` |
|
|
| See also | [Multi Pipeline](./multi_pipeline.md) |
|
|
|
|
## `NIX_CI_FORCE_BUILD`
|
|
|
|
| | |
|
|
| ----------- | -------------------------------------------------------------------------------------- |
|
|
| Default | N/A |
|
|
| Description | Set to any non-empty value to force the `nix-ci:build` job to freshly build the config |
|
|
| See also | [Caching](./caching.md) |
|
|
|
|
## `NIX_CI_DISABLE_CACHE`
|
|
|
|
| | |
|
|
| ----------- | ------------------------------------------------------ |
|
|
| Default | N/A |
|
|
| Description | Set to any non-empty value to disable caching for jobs |
|
|
| See also | [Caching](./caching.md) |
|
|
|
|
## `NIX_CI_CACHE_STRATEGY`
|
|
|
|
| | |
|
|
| ----------- | --------------------------------------------------------------------------------- |
|
|
| Default | `$[[ inputs.cache_strategy ]]` -> defaults to `auto` |
|
|
| Description | Caching strategy to use. `auto` will select the strategy based on runner settings |
|
|
| See also | [Caching](./caching.md) |
|
|
|
|
## `NIX_CI_RUNNER_CACHE_STRATEGY`
|
|
|
|
| | |
|
|
| ----------- | ---------------------------------------------------------------- |
|
|
| Default | N/A |
|
|
| Description | Every runner can set it's own preferred cache strategy with this |
|
|
| See also | [Caching](./caching.md) |
|
|
|
|
## `NIX_CI_DEFAULT_CACHE_STRATEGY`
|
|
|
|
| | |
|
|
| ----------- | ------------------------------------------------------------------------------------------------- |
|
|
| Default | `none` |
|
|
| Description | If no runner cache strategy is set and the main strategy is set to auto, this will be the default |
|
|
| See also | [Caching](./caching.md) |
|
|
|
|
## `RUNNER_CACHE`
|
|
|
|
| | |
|
|
| ----------- | -------------------------------------- |
|
|
| Default | `.nix-cache` |
|
|
| Description | Path to directory for the runner cache |
|
|
| See also | [Caching](./caching.md) |
|
|
|
|
## `CACHIX_CACHE`
|
|
|
|
| | |
|
|
| ----------- | ------------------------------- |
|
|
| Default | N/A |
|
|
| Description | Name of the cachix cache to use |
|
|
| See also | [Caching](./caching.md) |
|
|
|
|
## `ATTIC_CACHE`
|
|
|
|
| | |
|
|
| ----------- | ------------------------------ |
|
|
| Default | N/A |
|
|
| Description | Name of the attic cache to use |
|
|
| See also | [Caching](./caching.md) |
|
|
|
|
## `ATTIC_SERVER`
|
|
|
|
| | |
|
|
| ----------- | ----------------------- |
|
|
| Default | N/A |
|
|
| Description | URL of the attic server |
|
|
| See also | [Caching](./caching.md) |
|
|
|
|
## `ATTIC_TOKEN`
|
|
|
|
| | |
|
|
| ----------- | ------------------------------- |
|
|
| Default | N/A |
|
|
| Description | API token from the attic server |
|
|
| See also | [Caching](./caching.md) |
|