Compare commits

...

10 commits

Author SHA1 Message Date
5e9fdc5c9e
unmount 2025-08-04 22:45:33 +02:00
9a43bdd922
no '--eval-store local' 2025-08-04 22:45:33 +02:00
e681ff67d5
unverbose, auto store first 2025-08-04 22:45:33 +02:00
f171f3323d
less verbose 2025-08-04 22:45:33 +02:00
db278f36a0
multiple stores 2025-08-04 22:45:33 +02:00
f2d7d06158
more verbose 2025-08-04 22:45:33 +02:00
e8a96e4994
rm some pipelines 2025-08-04 22:45:33 +02:00
2817e3c772
try store mounted read-only
- `--store` as per
https://blog.kotatsu.dev/posts/2023-04-21-woodpecker-nix-caching/
- `--eval-store` as per
https://kevincox.ca/2022/01/02/nix-in-docker-caching/

mount store

rm kvm

bash -> sh
2025-08-04 22:45:33 +02:00
5005c43d51
mv woodpecker 2025-08-04 22:44:59 +02:00
ffc8211d6c
mount /dev/kvm
This reverts commit 32a8c011133045f624f23d0cacd6e2b81ccc78eb.
2025-08-04 22:43:55 +02:00
12 changed files with 10 additions and 115 deletions

View file

@ -8,12 +8,14 @@ when:
steps:
- name: build
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- |
mkdir -p ~/.ssh
echo "$CD_SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
- nix-shell --run 'eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_ed25519 && ssh-agent -s && SHELL=$(which bash) nixops4 apply -v default'
- nix-shell --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --run 'eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_ed25519 && ssh-agent -s && SHELL=$(which sh) nixops4 apply -v default'
environment:
CD_SSH_KEY:
from_secret: cd_ssh_key

View file

@ -9,5 +9,7 @@ when:
steps:
- name: check-data-model
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- nix-shell --run 'nix-unit ./deployment/data-model-test.nix'
- nix-shell --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --run 'nix-unit ./deployment/data-model-test.nix'

View file

@ -1,13 +0,0 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/refs/heads/main/pipeline/frontend/yaml/linter/schema/schema.json
when:
- event: manual
- event: pull_request
- event: push
branch: main
steps:
- name: check-deployment-basic
image: nixos/nix
commands:
- nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.deployment-basic -L

View file

@ -1,13 +0,0 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/refs/heads/main/pipeline/frontend/yaml/linter/schema/schema.json
when:
- event: manual
- event: pull_request
- event: push
branch: main
steps:
- name: check-deployment-cli
image: nixos/nix
commands:
- nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.deployment-cli -L

View file

@ -1,13 +0,0 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/refs/heads/main/pipeline/frontend/yaml/linter/schema/schema.json
when:
- event: manual
- event: pull_request
- event: push
branch: main
steps:
- name: check-deployment-panel
image: nixos/nix
commands:
- nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.deployment-panel -L

View file

@ -9,5 +9,7 @@ when:
steps:
- name: check-mastodon
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.test-mastodon-service -L
- nix build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.test-mastodon-service -L

View file

@ -1,13 +0,0 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/refs/heads/main/pipeline/frontend/yaml/linter/schema/schema.json
when:
- event: manual
- event: pull_request
- event: push
branch: main
steps:
- name: check-panel
image: nixos/nix
commands:
- nix-build -A tests.panel

View file

@ -1,13 +0,0 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/refs/heads/main/pipeline/frontend/yaml/linter/schema/schema.json
when:
- event: manual
- event: pull_request
- event: push
branch: main
steps:
- name: check-peertube
image: nixos/nix
commands:
- nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.test-peertube-service -L

View file

@ -1,13 +0,0 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/refs/heads/main/pipeline/frontend/yaml/linter/schema/schema.json
when:
- event: manual
- event: pull_request
- event: push
branch: main
steps:
- name: check-pre-commit
image: nixos/nix
commands:
- nix-build -A tests

View file

@ -1,33 +0,0 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/refs/heads/main/pipeline/frontend/yaml/linter/schema/schema.json
when:
- event: manual
- event: push
branch: main
## NOTE: NixOps4 does not provide a good “dry run” mode, so we instead check
## proxies for resources, namely whether their `.#vmOptions.<machine>` and
## `.#nixosConfigurations.<machine>` outputs evaluate and build correctly, and
## whether we can dry run `infra/proxmox-*.sh` on them. This will not catch
## everything, and in particular not issues in how NixOps4 wires up the
## resources, but that is still something.
steps:
- name: check-resources
image: nixos/nix
commands:
- echo ==================== [ VM Options ] ====================
- |
set -euC
machines=$(nix eval --impure --raw --expr 'with builtins; toString (attrNames (getFlake (toString ./.)).vmOptions)')
for machine in $machines; do
echo ~~~~~~~~~~~~~~~~~~~~~: $machine :~~~~~~~~~~~~~~~~~~~~~
nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.vmOptions-$machine
done
- echo ==================== [ NixOS Configurations ] ====================
- |
set -euC
machines=$(nix eval --impure --raw --expr 'with builtins; toString (attrNames (getFlake (toString ./.)).nixosConfigurations)')
for machine in $machines; do
echo ~~~~~~~~~~~~~~~~~~~~~: $machine :~~~~~~~~~~~~~~~~~~~~~
nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.nixosConfigurations-$machine
done

View file

@ -20,7 +20,7 @@
nixos.module = {
imports = [
./woodpecker.nix
../forgejo-ci/woodpecker.nix
];
};
}