2021-05-29 18:21:58 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2021-06-14 22:20:42 +00:00
|
|
|
name: upstreaming
|
|
|
|
|
|
|
|
clone:
|
|
|
|
disable: true
|
2021-05-29 18:21:58 +00:00
|
|
|
|
|
|
|
steps:
|
2021-06-14 19:39:29 +00:00
|
|
|
- name: "Sync upstream to local"
|
2021-06-14 20:28:29 +00:00
|
|
|
image: nixery.dev/shell/git/openssh
|
2021-06-14 21:36:03 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- cron
|
2021-06-14 21:38:49 +00:00
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- upstream
|
2021-05-29 18:21:58 +00:00
|
|
|
environment:
|
|
|
|
GITEA_SSH_KEY:
|
|
|
|
from_secret: gitea_ssh_key
|
2021-06-14 20:41:55 +00:00
|
|
|
HOME: /root
|
2021-05-29 18:21:58 +00:00
|
|
|
commands:
|
2021-06-14 22:27:55 +00:00
|
|
|
- ./.drone/setup_ssh.sh
|
2021-06-14 22:31:18 +00:00
|
|
|
- git clone -b devos https://git.b12f.io/pub-solar/os .
|
2021-06-14 21:00:30 +00:00
|
|
|
- git remote add devos git@git.b12f.io:pub-solar/devos
|
2021-05-29 18:21:58 +00:00
|
|
|
- git fetch --all
|
2021-06-14 19:39:29 +00:00
|
|
|
- git merge -X theirs devos/core
|
|
|
|
- git push origin devos
|
|
|
|
|
|
|
|
- name: "Sync core with upstream"
|
2021-06-14 20:28:29 +00:00
|
|
|
image: nixery.dev/shell/git/openssh
|
2021-06-14 19:39:29 +00:00
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- success
|
2021-06-14 21:36:03 +00:00
|
|
|
event:
|
|
|
|
- cron
|
2021-06-14 21:38:49 +00:00
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- upstream
|
2021-06-14 19:39:29 +00:00
|
|
|
depends_on:
|
|
|
|
- "Sync upstream to local"
|
|
|
|
environment:
|
|
|
|
GITEA_SSH_KEY:
|
|
|
|
from_secret: gitea_ssh_key
|
2021-06-14 20:41:55 +00:00
|
|
|
HOME: /root
|
2021-06-14 19:39:29 +00:00
|
|
|
commands:
|
2021-06-14 22:25:50 +00:00
|
|
|
- ./.drone/setup_ssh.sh
|
2021-06-14 21:03:38 +00:00
|
|
|
- git fetch --all
|
2021-06-14 21:09:21 +00:00
|
|
|
- git checkout --track origin/core
|
|
|
|
- git merge origin/devos
|
2021-06-14 19:02:54 +00:00
|
|
|
- git push origin core
|
2021-06-14 19:39:29 +00:00
|
|
|
|
2021-06-14 19:44:15 +00:00
|
|
|
- name: "Notify success"
|
2021-06-14 21:38:49 +00:00
|
|
|
image: plugins/matrix
|
2021-06-14 19:39:29 +00:00
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- success
|
2021-06-14 21:36:03 +00:00
|
|
|
event:
|
|
|
|
- cron
|
2021-06-14 21:38:49 +00:00
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- upstream
|
2021-06-14 19:39:29 +00:00
|
|
|
depends_on:
|
|
|
|
- "Sync core with upstream"
|
|
|
|
settings:
|
2021-06-14 21:31:08 +00:00
|
|
|
homeserver: https://matrix.pub.solar
|
2021-06-14 21:34:41 +00:00
|
|
|
roomid: dfQBqwkhIzrFjMSsxy:pub.solar
|
2021-06-14 19:39:29 +00:00
|
|
|
username:
|
|
|
|
from_secret: matrix_username
|
|
|
|
password:
|
|
|
|
from_secret: matrix_password
|
|
|
|
template: Upstreaming devos into core succeeded.
|
|
|
|
|
|
|
|
- name: "Open pull request for failed merge"
|
2021-06-14 19:41:13 +00:00
|
|
|
image: nixery.dev/shell/tea
|
2021-06-14 19:39:29 +00:00
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- failure
|
2021-06-14 21:36:03 +00:00
|
|
|
event:
|
|
|
|
- cron
|
2021-06-14 21:38:49 +00:00
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- upstream
|
2021-06-14 19:39:29 +00:00
|
|
|
depends_on:
|
|
|
|
- "Sync core with upstream"
|
|
|
|
environment:
|
|
|
|
TEA_CONFIG:
|
|
|
|
from_secret: tea_config
|
|
|
|
commands:
|
2021-06-14 19:44:15 +00:00
|
|
|
- mkdir -p ~/.config/tea
|
2021-06-14 20:56:15 +00:00
|
|
|
- echo "$$TEA_CONFIG" > ~/.config/tea/config.yml
|
2021-06-14 19:39:29 +00:00
|
|
|
- tea pulls create --base core --head devos
|
|
|
|
|
2021-06-14 21:36:03 +00:00
|
|
|
- name: "Notify failure"
|
2021-06-14 19:39:29 +00:00
|
|
|
image: plugins/matrix
|
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- success
|
2021-06-14 21:36:03 +00:00
|
|
|
event:
|
|
|
|
- cron
|
2021-06-14 21:38:49 +00:00
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- upstream
|
2021-06-14 19:39:29 +00:00
|
|
|
depends_on:
|
|
|
|
- "Open pull request for failed merge"
|
|
|
|
settings:
|
2021-06-14 21:31:08 +00:00
|
|
|
homeserver: https://matrix.pub.solar
|
2021-06-14 21:38:49 +00:00
|
|
|
roomid: dfQBqwkhIzrFjMSsxy:pub.solar
|
2021-06-14 19:39:29 +00:00
|
|
|
username:
|
|
|
|
from_secret: matrix_username
|
|
|
|
password:
|
|
|
|
from_secret: matrix_password
|
|
|
|
template: Upstreaming devos into core failed. A pull request has been created https://git.b12f.io/pub-solar/os/pulls
|