docs: update docs + add plugin metadata (#15)
Reviewed-on: https://git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic/pulls/15 Co-authored-by: Gabor Pihaj <gabor.pihaj@gmail.com> Co-committed-by: Gabor Pihaj <gabor.pihaj@gmail.com>
This commit is contained in:
parent
36d3e46145
commit
2bf013c916
2 changed files with 53 additions and 18 deletions
27
README.md
27
README.md
|
@ -1,25 +1,16 @@
|
||||||
# Woodpecker plugin: nix-attic
|
# Woodpecker plugin: nix-attic
|
||||||
|
|
||||||
This woodpecker plugin can be configured to use a private binary cache, and it also has
|
This Woodpecker CI plugin is to build and cache nix derivations using the binary cache
|
||||||
[attic-client](ihttps://github.com/zhaofengli/attic) pre-installed.
|
[attic](https://github.com/zhaofengli/attic). The image is based on NixOS.
|
||||||
|
|
||||||
## Example configuration
|
## Features
|
||||||
|
|
||||||
```yaml
|
- nix experimental features enabled by default: commands and flakes
|
||||||
steps:
|
- preinstalled [attic-client](https://github.com/zhaofengli/attic)
|
||||||
check:
|
|
||||||
image: git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic:0.1.0
|
## Usage
|
||||||
settings:
|
|
||||||
binary_cache: https://some-binary-cache.example.com
|
See [docs.md](docs.md).
|
||||||
binary_cache_public_key: some-binary-cache.example.com:some-public-key
|
|
||||||
binary_cache_token:
|
|
||||||
from_secret: binary_cache_access_token
|
|
||||||
script: |
|
|
||||||
nix flake check
|
|
||||||
nix build
|
|
||||||
attic login default $PLUGIN_BINARY_CACHE_TOKEN
|
|
||||||
attic push some-cache $(nix path-info .#default)
|
|
||||||
```
|
|
||||||
|
|
||||||
## How to build the image locally?
|
## How to build the image locally?
|
||||||
|
|
||||||
|
|
44
docs.md
Normal file
44
docs.md
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
---
|
||||||
|
name: Nix - Attic
|
||||||
|
description: Plugin for building and caching nix derivations using attic
|
||||||
|
authors: Gabor Pihaj <me@gaborpihaj.com>
|
||||||
|
tags: [woodpecker, nixos, nix, attic]
|
||||||
|
containerImage: git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic
|
||||||
|
containerImageUrl: https://git.vdx.hu/voidcontext/-/packages/container/woodpecker-plugin-nix-attic
|
||||||
|
url: https://git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic
|
||||||
|
---
|
||||||
|
|
||||||
|
This Woodpecker CI plugin is to build and cache nix derivations using the binary cache
|
||||||
|
[attic](https://github.com/zhaofengli/attic). The image is based on NixOS.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- nix experimental features enabled by default: commands and flakes
|
||||||
|
- preinstalled [attic-client](https://github.com/zhaofengli/attic)
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
| Settings Name | Default | Description
|
||||||
|
|---------------------------|---------|--------------------------------------------
|
||||||
|
| `binary_cache` | *none* | sets the URL of the binary cache
|
||||||
|
| `binary_cache_public_key` | *none* | sets the public key of the binary cache
|
||||||
|
| `binary_cache_token` | *none* | sets the access token of the binary cache
|
||||||
|
| `script` | *none* | sets the commands / script to run
|
||||||
|
|
||||||
|
## Example configuration
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
check:
|
||||||
|
image: git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic
|
||||||
|
settings:
|
||||||
|
binary_cache: https://some-binary-cache.example.com
|
||||||
|
binary_cache_public_key: some-binary-cache.example.com:some-public-key
|
||||||
|
binary_cache_token:
|
||||||
|
from_secret: binary_cache_access_token
|
||||||
|
script: |
|
||||||
|
nix flake check
|
||||||
|
nix build
|
||||||
|
attic login default $PLUGIN_BINARY_CACHE_TOKEN
|
||||||
|
attic push some-cache $(nix path-info .#default)
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue