122 lines
3.6 KiB
YAML
122 lines
3.6 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: Check
|
|
|
|
steps:
|
|
- name: "Check"
|
|
image: docker.nix-community.org/nixpkgs/nix-flakes:latest
|
|
when:
|
|
event:
|
|
- pull_request
|
|
environment:
|
|
NIX_FLAGS: "--print-build-logs --verbose"
|
|
commands:
|
|
- 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS'
|
|
- nix $$NIX_FLAGS develop --command nix flake show
|
|
- nix $$NIX_FLAGS build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel"
|
|
|
|
---
|
|
kind: pipeline
|
|
type: exec
|
|
name: Tests
|
|
|
|
steps:
|
|
#- name: "Tests"
|
|
# environment:
|
|
# NIX_FLAGS: "--print-build-logs --verbose"
|
|
# commands:
|
|
# - 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS'
|
|
# - nix $$NIX_FLAGS build ".#checks.x86_64-linux.customTestFor-PubSolarOS-firstTest"
|
|
# - nix-store --read-log result
|
|
# - nix $$NIX_FLAGS flake check
|
|
# - nix $$NIX_FLAGS develop --command echo OK
|
|
|
|
- name: "Upload artifacts"
|
|
environment:
|
|
TRITON_DONT_SOURCE_PROFILE: 1
|
|
PRIVATE_SSH_KEY:
|
|
from_secret: private_ssh_key
|
|
MANTA_USER: pub_solar
|
|
MANTA_URL: https://eu-central.manta.greenbaum.cloud
|
|
MANTA_KEY_ID: "02:ae:79:2b:8f:7f:51:ba:c6:3c:ea:6f:f7:bb:d1:6a"
|
|
commands:
|
|
- export TARGET_DIR="$${DRONE_REPO}/$${DRONE_BUILD_NUMBER}"
|
|
- echo env var TARGET_DIR is set to $$TARGET_DIR
|
|
- "mkdir ~/.ssh && chmod 700 ~/.ssh"
|
|
- echo "$$PRIVATE_SSH_KEY" > ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519
|
|
- eval "$(/run/current-system/sw/bin/ssh-agent)"
|
|
- /run/current-system/sw/bin/ssh-add ~/.ssh/id_ed25519
|
|
- nix flake new --template "git+https://git.greenbaum.cloud/dev/tritonshell?ref=main" ./tritonshell
|
|
- git add tritonshell
|
|
- cd tritonshell
|
|
- nix develop --command mput -p -f ../result/foot_wayland_info.png ~~/public/$${TARGET_DIR}
|
|
- nix develop --command mput -p -f ../result/test-wayland.out ~~/public/$${TARGET_DIR}
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/tags/v*
|
|
- refs/tags/t*
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: Publish ISO
|
|
|
|
steps:
|
|
- name: "Build ISO"
|
|
image: docker.nix-community.org/nixpkgs/nix-flakes:latest
|
|
environment:
|
|
NIX_FLAGS: "--print-build-logs --verbose"
|
|
volumes:
|
|
- name: file-exchange
|
|
path: /var/nix/iso-cache
|
|
commands:
|
|
- |
|
|
nix $$NIX_FLAGS build \
|
|
'.#nixosConfigurations.bootstrap.config.system.build.bootstrapIso'
|
|
- cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/
|
|
|
|
- name: "Publish ISO"
|
|
image: appleboy/drone-scp
|
|
volumes:
|
|
- name: file-exchange
|
|
path: /var/nix/iso-cache
|
|
settings:
|
|
host:
|
|
from_secret: ssh_host
|
|
user:
|
|
from_secret: ssh_user
|
|
port:
|
|
from_secret: ssh_port
|
|
key:
|
|
from_secret: ssh_key
|
|
target: /srv/os
|
|
source:
|
|
- /var/nix/iso-cache/*.iso
|
|
strip_components: 3
|
|
|
|
depends_on:
|
|
- Check
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
|
|
volumes:
|
|
- name: file-exchange
|
|
temp: {}
|
|
|
|
---
|
|
kind: secret
|
|
name: private_ssh_key
|
|
data: cSWd6rIg8Z51hD+KMenYPX669qb6PWdh9V80Z1YpED68Ffoy73tWEoBjEs2pKUJpcL8qGxMjj5Ot2TAK6iUs5Qnv+ZKmjvvttgVCfKdHE6ULT+aOPdl3PvvKV6VY5iapE7aXmPF5NWuMe4G6OJiA/IP5U4P4hspAUV4/MlAjiLYDNtfJSXpA/5Hv5PvjuTM2RartUdXLdFe5qXfMFlmFKeU6J9jxf0BFY9lwhniOsxTGo6YQmf0fEqRd6i2AeKN58Oevir3H5rKQvDhCAUmPxT8rEHYoG7sgkt4ow+0gWyLuoimetZHHT/0IKbSWpQV9rfgxMa7L9TvN9pe573dKjFcGpJpbUsaL8O7R/Av6APzcNBWwNArMcD7/nSuj/33bppCJfC3IA5KLrRqi2Tt5nVw7Wm5eYX4iloftCBFsuI2Zj3B9eW4wrKy4k/CvP7klinaoyfGrt48Z3K3JCOUnwaZH/4xTE8+V0UeYEfDjU10etVa27I//sxK/yBRNrX3pRXnwQS997/zW8KHhzh7C4BUNkKj9k2qjxFPRKJp3knbfHlEsirfFcPXoDSRlBHpvDqKzNkxtAA==
|
|
|
|
---
|
|
kind: signature
|
|
hmac: 5cbd1354b408875cf235d86cc5b98e109609106237a1337a130391cbf5cd9355
|
|
|
|
...
|