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-06-27 15:23:18 +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 14:47:08 +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 fetch
|
|
|
|
- git checkout devos
|
|
|
|
- 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-05 14:47:08 +00:00
|
|
|
- git merge -X theirs devos/main
|
2021-06-14 23:28:23 +00:00
|
|
|
- git push origin devos
|
|
|
|
|
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 14:47:08 +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-05 14:47:08 +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
|
|
|
|
- ./.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 14:47:08 +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 14:47:08 +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 14:47:08 +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)"
|
|
|
|
---
|
|
|
|
kind: signature
|
2021-07-07 17:50:51 +00:00
|
|
|
hmac: f88330a68ced90f4c242aedcbec9359fa63f00c47db6707e2646546daa4a9109
|
2021-06-14 23:28:23 +00:00
|
|
|
|
|
|
|
...
|