os/.drone.yml

114 lines
3.2 KiB
YAML
Raw Normal View History

---
2021-05-29 18:21:58 +00:00
kind: pipeline
type: docker
name: Upstreaming
2021-05-29 18:21:58 +00:00
steps:
- name: "Sync 'devos' branch with upstream"
image: alpine/git
when:
event:
- cron
cron:
- sync-main-with-upstream
2021-05-29 18:21:58 +00:00
environment:
GITEA_SSH_KEY:
from_secret: gitea_ssh_key
commands:
- ./.drone/setup_ssh.sh
- git remote add devos git@git.b12f.io:pub-solar/devos
- git remote set-url origin git@git.b12f.io:pub-solar/os
2021-05-29 18:21:58 +00:00
- git fetch --all
- git checkout -b devos --track origin/devos
- git merge -X theirs devos/main
- git push origin devos
- name: "Sync $BRANCH with upstream"
image: alpine/git
when:
event:
- cron
cron:
- sync-main-with-upstream
- sync-b12f-with-main
- sync-teutat3s-with-main
environment:
GITEA_SSH_KEY:
from_secret: gitea_ssh_key
commands:
- git fetch --all
- git checkout origin/main
- ./.drone/setup_ssh.sh
- git remote set-url origin git@git.b12f.io:pub-solar/os
- git fetch --all
- ./.drone/upstream-branch.sh
- name: "Open pull request for failed merge"
image: nixery.dev/shell/tea
when:
status:
- failure
event:
- cron
cron:
- sync-main-with-upstream
- sync-b12f-with-main
- sync-teutat3s-with-main
environment:
TEA_CONFIG:
from_secret: tea_config
commands:
- mkdir -p ~/.config/tea
- echo "$$TEA_CONFIG" > ~/.config/tea/config.yml
- tea pulls create --base main --head devos
- name: "Notify matrix"
image: plugins/matrix
when:
status:
- success
- failure
event:
- cron
cron:
- sync-main-with-upstream
- sync-b12f-with-main
- sync-teutat3s-with-main
settings:
homeserver: https://matrix.pub.solar
roomid: dfQBqwkhIzrFjMSsxy:pub.solar
username:
from_secret: matrix_username
password:
from_secret: matrix_password
template: "Upstreaming {{ build.status }} [{{ build.branch }}#{{ truncate build.commit 8 }}]({{ build.link }}) by {{ build.author }}. [Pull requests](https://git.b12f.io/pub-solar/os/pulls)"
2021-10-24 18:13:31 +00:00
---
kind: pipeline
type: docker
name: Check
steps:
- name: "Check"
image: nixpkgs/nix-flakes:nixos-21.05
when:
event:
- pull_request
- tag
commands:
- echo "" >> /etc/nix/nix.conf
- echo "system-features = nixos-test benchmark big-parallel kvm recursive-nix" >> /etc/nix/nix.conf
- echo "substituters = https://nrdxp.cachix.org https://nix-community.cachix.org https://cache.nixos.org" >> /etc/nix/nix.conf
- echo "trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" >> /etc/nix/nix.conf
2021-10-24 20:03:28 +00:00
# Currently broken
#- nix -Lv flake check
2021-10-24 18:13:31 +00:00
- nix -Lv build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel"
- nix -Lv develop -c echo OK
- nix -Lv develop --command bud --help
---
kind: signature
2021-10-24 18:13:31 +00:00
hmac: 36b824020f2bafbb46bc0b4087296e82db41677a3b5b85c7851b90322492343c
...