forked from fediversity/fediversity
Compare commits
10 commits
8565d2eddc
...
5e9fdc5c9e
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e9fdc5c9e | |||
| 9a43bdd922 | |||
| e681ff67d5 | |||
| f171f3323d | |||
| db278f36a0 | |||
| f2d7d06158 | |||
| e8a96e4994 | |||
| 2817e3c772 | |||
| 5005c43d51 | |||
| ffc8211d6c |
12 changed files with 10 additions and 115 deletions
|
|
@ -8,12 +8,14 @@ when:
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: nixos/nix
|
image: nixos/nix
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "$CD_SSH_KEY" > ~/.ssh/id_ed25519
|
echo "$CD_SSH_KEY" > ~/.ssh/id_ed25519
|
||||||
chmod 600 ~/.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:
|
environment:
|
||||||
CD_SSH_KEY:
|
CD_SSH_KEY:
|
||||||
from_secret: cd_ssh_key
|
from_secret: cd_ssh_key
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,7 @@ when:
|
||||||
steps:
|
steps:
|
||||||
- name: check-data-model
|
- name: check-data-model
|
||||||
image: nixos/nix
|
image: nixos/nix
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
commands:
|
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'
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -9,5 +9,7 @@ when:
|
||||||
steps:
|
steps:
|
||||||
- name: check-mastodon
|
- name: check-mastodon
|
||||||
image: nixos/nix
|
image: nixos/nix
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
commands:
|
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
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
nixos.module = {
|
nixos.module = {
|
||||||
imports = [
|
imports = [
|
||||||
./woodpecker.nix
|
../forgejo-ci/woodpecker.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue