forked from fediversity/fediversity
Compare commits
13 commits
9c7c38bd45
...
37c8bdc348
| Author | SHA1 | Date | |
|---|---|---|---|
| 37c8bdc348 | |||
| a8f5571dae | |||
| 3c1971c6a4 | |||
| dd095fc3a4 | |||
| 633deebfec | |||
| ae7a285b1e | |||
| 2b1b6a90a4 | |||
| a6dd45518f | |||
| 2bf5c008d3 | |||
| f2c001ccaa | |||
| 319d3fc1e1 | |||
| cd42bd91c4 | |||
| dce216c87c |
11 changed files with 121 additions and 12 deletions
|
|
@ -8,14 +8,12 @@ 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 --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'
|
||||
- nix-shell --run 'eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_ed25519 && ssh-agent -s && SHELL=$(which bash) nixops4 apply -v default'
|
||||
environment:
|
||||
CD_SSH_KEY:
|
||||
from_secret: cd_ssh_key
|
||||
|
|
|
|||
|
|
@ -9,7 +9,5 @@ when:
|
|||
steps:
|
||||
- name: check-data-model
|
||||
image: nixos/nix
|
||||
volumes:
|
||||
- /nix:/mnt/nix:ro
|
||||
commands:
|
||||
- nix-shell --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --run 'nix-unit ./deployment/data-model-test.nix'
|
||||
- nix-shell --run 'nix-unit ./deployment/data-model-test.nix'
|
||||
|
|
|
|||
15
.woodpecker/check-deployment-basic.yaml
Normal file
15
.woodpecker/check-deployment-basic.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
$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
|
||||
devices:
|
||||
- /dev/kvm:/dev/kvm
|
||||
15
.woodpecker/check-deployment-cli.yaml
Normal file
15
.woodpecker/check-deployment-cli.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
$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
|
||||
devices:
|
||||
- /dev/kvm:/dev/kvm
|
||||
15
.woodpecker/check-deployment-panel.yaml
Normal file
15
.woodpecker/check-deployment-panel.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
$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
|
||||
devices:
|
||||
- /dev/kvm:/dev/kvm
|
||||
|
|
@ -9,7 +9,5 @@ when:
|
|||
steps:
|
||||
- name: check-mastodon
|
||||
image: nixos/nix
|
||||
volumes:
|
||||
- /nix:/mnt/nix:ro
|
||||
commands:
|
||||
- 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
|
||||
- nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.test-mastodon-service -L
|
||||
|
|
|
|||
13
.woodpecker/check-panel.yaml
Normal file
13
.woodpecker/check-panel.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
$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
|
||||
13
.woodpecker/check-peertube.yaml
Normal file
13
.woodpecker/check-peertube.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
$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
|
||||
13
.woodpecker/check-pre-commit.yaml
Normal file
13
.woodpecker/check-pre-commit.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
$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
|
||||
33
.woodpecker/check-resources.yaml
Normal file
33
.woodpecker/check-resources.yaml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
$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
|
||||
|
|
@ -8,10 +8,8 @@ when:
|
|||
steps:
|
||||
- name: lockfile
|
||||
image: nixos/nix
|
||||
volumes:
|
||||
- /nix:/mnt/nix:ro
|
||||
commands:
|
||||
- nix-shell --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --run "npins update"
|
||||
- nix-shell --run "npins update"
|
||||
# - name: Create PR
|
||||
# uses: https://github.com/KiaraGrouwstra/gitea-create-pull-request@f9f80aa5134bc5c03c38f5aaa95053492885b397
|
||||
# with:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue