mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
docs(README): document running jobs locally
[skip ci]
This commit is contained in:
parent
a47ec8cbeb
commit
67d75bd167
1 changed files with 15 additions and 0 deletions
15
README.md
15
README.md
|
|
@ -58,6 +58,21 @@ anything non-empty (eg. "yes") when triggering the pipeline.
|
|||
The `build:nix-ci` job has a different special environment variable `NIX_CI_SKIP_CACHE`
|
||||
(useful if the generated pipeline is outdated but caching should generally still take place).
|
||||
|
||||
### Run Jobs locally
|
||||
|
||||
You can run any job's script (+ before and after) locally with Nix for easier testing:
|
||||
|
||||
```sh
|
||||
nix run .#gitlab-ci-job:<name>
|
||||
```
|
||||
|
||||
There is also `.#gitlab-ci-job-deps:<name>` which generates and exports the required environment variables for each job:
|
||||
|
||||
- PATH (with all deps)
|
||||
- any custom env variables which contain store paths to not break stuff when switching archs
|
||||
|
||||
Please see #8 for some issues and further improvements on this.
|
||||
|
||||
## Thanks to
|
||||
|
||||
Some parts of this implementation are adapted/inspired from https://gitlab.com/Cynerd/gitlab-ci-nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue