No description
Find a file
Milas Bowman b636b8ff96 HACK: add rsync to core image
use to pre-populate PVC volume
2023-12-29 06:32:32 -05:00
.woodpecker build!: cache attic client and remove "latest" flake output (#18) 2023-11-30 23:23:51 +00:00
CHANGELOG.md chore(version): 0.1.1 2023-09-30 19:19:42 +01:00
cog.toml build: add publish release pipeline (#5) 2023-09-30 17:02:41 +00:00
docs.md docs: update docs + add plugin metadata (#15) 2023-11-30 21:25:47 +00:00
entrypoint.nix HACK: auto-login 2023-12-29 06:32:13 -05:00
flake.lock [HACK] aarch64 2023-12-29 00:58:33 -05:00
flake.nix [HACK] aarch64 2023-12-29 00:58:33 -05:00
mkImage.nix HACK: add rsync to core image 2023-12-29 06:32:32 -05:00
README.md docs: update docs + add plugin metadata (#15) 2023-11-30 21:25:47 +00:00

Woodpecker plugin: nix-attic

This Woodpecker CI plugin is to build and cache nix derivations using the binary cache attic. The image is based on NixOS.

Features

  • nix experimental features enabled by default: commands and flakes
  • preinstalled attic-client

Usage

See docs.md.

How to build the image locally?

On Linux

$ nix build
$ docker load -i result

On macOS

The easiest way to build the image is using a previously built version of the image:

$ echo << EOF >> cmd.txt
nix build
nix-env -iA nixpkgs.docker-client
docker load -i result
EOF
$ docker run -it                                                                   \
  -e PLUGIN_BINARY_CACHE=https://some-binary-cache.example.com                     \
  -e PLUGIN_BINARY_CACHE_PUBLIC_KEY=some-binary-cache.example.com:some-public-keyi \
  -e PLUGIN_BINARY_CACHE_TOKEN=$ACCESS_TOKEN                                       \
  -e PLUGIN_SCRIPT="$(cat cmd.txt)"                                                \
  -v $(pwd):/opt/plugin                                                            \
  -w /opt/plugin                                                                   \
  -v /var/run/docker.sock:/var/run/docker.sock                                     \
  git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic:0.1.0