2021-06-14 23:28:23 +00:00
|
|
|
---
|
2021-05-29 18:21:58 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2021-06-14 23:28:23 +00:00
|
|
|
name: Upstreaming
|
2021-05-29 18:21:58 +00:00
|
|
|
|
|
|
|
steps:
|
2021-10-11 21:47:46 +00:00
|
|
|
- name: "Sync 'devos' branch with upstream"
|
2021-06-14 23:28:23 +00:00
|
|
|
image: alpine/git
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- cron
|
2021-07-07 17:50:51 +00:00
|
|
|
cron:
|
2021-10-05 19:32:54 +00:00
|
|
|
- sync-main-with-upstream
|
2021-05-29 18:21:58 +00:00
|
|
|
environment:
|
|
|
|
GITEA_SSH_KEY:
|
|
|
|
from_secret: gitea_ssh_key
|
|
|
|
commands:
|
2021-06-14 23:28:23 +00:00
|
|
|
- ./.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
|
2021-10-11 22:03:38 +00:00
|
|
|
- git checkout -b devos --track origin/devos
|
2021-10-05 19:32:54 +00:00
|
|
|
- git merge -X theirs devos/main
|
2021-06-14 23:28:23 +00:00
|
|
|
- git push origin devos
|
2021-10-22 12:04:17 +00:00
|
|
|
- git remote set-url origin https://git.b12f.io/pub-solar/os.git
|
2021-06-14 23:28:23 +00:00
|
|
|
|
2021-06-27 15:23:18 +00:00
|
|
|
- name: "Sync $BRANCH with upstream"
|
2021-06-14 23:28:23 +00:00
|
|
|
image: alpine/git
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- cron
|
2021-07-07 17:50:51 +00:00
|
|
|
cron:
|
2021-10-05 19:32:54 +00:00
|
|
|
- sync-main-with-upstream
|
|
|
|
- sync-b12f-with-main
|
|
|
|
- sync-teutat3s-with-main
|
2021-06-14 23:28:23 +00:00
|
|
|
environment:
|
|
|
|
GITEA_SSH_KEY:
|
|
|
|
from_secret: gitea_ssh_key
|
|
|
|
commands:
|
2021-10-25 23:07:10 +00:00
|
|
|
- git fetch origin
|
2021-10-20 07:52:46 +00:00
|
|
|
- git checkout origin/main
|
2021-06-14 23:28:23 +00:00
|
|
|
- ./.drone/setup_ssh.sh
|
|
|
|
- git remote set-url origin git@git.b12f.io:pub-solar/os
|
2021-10-20 07:47:12 +00:00
|
|
|
- git fetch --all
|
2021-06-14 23:28:23 +00:00
|
|
|
- ./.drone/upstream-branch.sh
|
|
|
|
|
|
|
|
- name: "Open pull request for failed merge"
|
|
|
|
image: nixery.dev/shell/tea
|
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- failure
|
|
|
|
event:
|
|
|
|
- cron
|
2021-07-07 17:50:51 +00:00
|
|
|
cron:
|
2021-10-05 19:32:54 +00:00
|
|
|
- sync-main-with-upstream
|
|
|
|
- sync-b12f-with-main
|
|
|
|
- sync-teutat3s-with-main
|
2021-06-14 23:28:23 +00:00
|
|
|
environment:
|
|
|
|
TEA_CONFIG:
|
|
|
|
from_secret: tea_config
|
|
|
|
commands:
|
|
|
|
- mkdir -p ~/.config/tea
|
|
|
|
- echo "$$TEA_CONFIG" > ~/.config/tea/config.yml
|
2021-10-05 19:32:54 +00:00
|
|
|
- tea pulls create --base main --head devos
|
2021-06-14 23:28:23 +00:00
|
|
|
|
|
|
|
- name: "Notify matrix"
|
|
|
|
image: plugins/matrix
|
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- success
|
|
|
|
- failure
|
|
|
|
event:
|
|
|
|
- cron
|
2021-07-07 17:50:51 +00:00
|
|
|
cron:
|
2021-10-05 19:32:54 +00:00
|
|
|
- sync-main-with-upstream
|
|
|
|
- sync-b12f-with-main
|
|
|
|
- sync-teutat3s-with-main
|
2021-06-14 23:28:23 +00:00
|
|
|
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
|
|
|
|
|
2021-10-24 20:55:28 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: Publish ISO
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Build ISO"
|
|
|
|
image: nixpkgs/nix-flakes:nixos-21.05
|
|
|
|
volumes:
|
|
|
|
- name: nix-store
|
2021-10-24 21:13:13 +00:00
|
|
|
path: /var/nix/iso-cache
|
2021-10-24 20:55:28 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
branch:
|
2021-10-24 21:04:53 +00:00
|
|
|
- feature/basic-iso
|
2021-10-24 20:55:28 +00:00
|
|
|
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 21:18:10 +00:00
|
|
|
- nix -Lv develop --command bud build bootstrap bootstrapIso
|
2021-10-24 21:13:13 +00:00
|
|
|
- cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/
|
2021-10-24 20:55:28 +00:00
|
|
|
|
|
|
|
- name: "Publish ISO"
|
|
|
|
image: appleboy/drone-scp
|
|
|
|
volumes:
|
|
|
|
- name: nix-store
|
2021-10-24 21:13:13 +00:00
|
|
|
path: /var/nix/iso-cache
|
2021-10-24 20:55:28 +00:00
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: ssh_host
|
|
|
|
user:
|
|
|
|
from_secret: ssh_user
|
|
|
|
port:
|
|
|
|
from_secret: ssh_port
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
target: /var/www/pub.solar
|
|
|
|
source:
|
2021-10-25 19:51:13 +00:00
|
|
|
- /var/nix/iso-cache/*.iso
|
2021-10-26 08:14:42 +00:00
|
|
|
strip_components: 3
|
2021-10-24 20:55:28 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: nix-store
|
|
|
|
host:
|
2021-10-24 21:13:13 +00:00
|
|
|
path: "/var/nix/iso-cache"
|
2021-10-24 20:55:28 +00:00
|
|
|
|
2021-06-14 23:28:23 +00:00
|
|
|
---
|
|
|
|
kind: signature
|
2021-10-26 08:33:42 +00:00
|
|
|
hmac: b80fc2bec44f00eb0e02943a918f45c7e652ae66e8b7a7a52ecc05c571fd5164
|
2021-06-14 23:28:23 +00:00
|
|
|
|
|
|
|
...
|