snowfield/.drone.yml
2021-12-26 22:55:09 +01:00

90 lines
1.9 KiB
YAML

---
kind: pipeline
type: exec
name: Build all hosts
platform:
os: linux
arch: amd64
steps:
- name: Show flake info
commands:
- nix --experimental-features "nix-command flakes" flake show
- nix --experimental-features "nix-command flakes" flake metadata
- nix --experimental-features "nix-command flakes" flake check
- name: Run flake checks
commands:
- nix --experimental-features "nix-command flakes" flake check --show-trace
- name: Build lisa
commands:
- nix build -v '.#nixosConfigurations.lisa.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org"
- name: Build newton
commands:
- nix build -v '.#nixosConfigurations.newton.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org"
- name: Build macintosh
commands:
- nix build -v '.#nixosConfigurations.macintosh.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org"
trigger:
branch:
- main
event:
- push
- pull_request
---
kind: pipeline
name: push flake update
type: docker
steps:
- name: Update flake.lock
image: nixpkgs/nix-flakes
commands:
- nix flake update --inputs-from nixpkgs
- nix flake show
- nix flake metadata
- nix flake check
- nix flake check --show-trace
environment:
NIX_PATH: nixpkgs=channel:nixos-unstable
- name: Push updated flake.lock
image: appleboy/drone-git-push
settings:
branch: update-flake
remote: git@github.com:JulienMalka/nix-config.git
force: true
commit: true
force: true
commit_message: "Updated flake.lock"
ssh_key:
from_secret: deploy_key
- name: notify on failure
image: drillster/drone-email
settings:
username: "julien.malka@me.com"
from:
from_secret: email_from
host:
from_secret: email_host
password:
from_secret: email_password
when:
status:
- failure
trigger:
branch:
- main
event:
- push
- cron