113 lines
2.6 KiB
YAML
113 lines
2.6 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: upstreaming
|
|
|
|
clone:
|
|
disable: true
|
|
|
|
steps:
|
|
- name: "Sync upstream to local"
|
|
image: nixery.dev/shell/git/openssh
|
|
when:
|
|
event:
|
|
- cron
|
|
- promote
|
|
target:
|
|
- upstream
|
|
environment:
|
|
GITEA_SSH_KEY:
|
|
from_secret: gitea_ssh_key
|
|
HOME: /root
|
|
commands:
|
|
- ./.drone/setup_ssh.sh
|
|
- git clone -b devos https://git.b12f.io/pub-solar/os .
|
|
- git remote add devos git@git.b12f.io:pub-solar/devos
|
|
- git fetch --all
|
|
- git merge -X theirs devos/core
|
|
- git push origin devos
|
|
|
|
- name: "Sync core with upstream"
|
|
image: nixery.dev/shell/git/openssh
|
|
when:
|
|
status:
|
|
- success
|
|
event:
|
|
- cron
|
|
- promote
|
|
target:
|
|
- upstream
|
|
depends_on:
|
|
- "Sync upstream to local"
|
|
environment:
|
|
GITEA_SSH_KEY:
|
|
from_secret: gitea_ssh_key
|
|
HOME: /root
|
|
commands:
|
|
- ./.drone/setup_ssh.sh
|
|
- git fetch --all
|
|
- git checkout --track origin/core
|
|
- git merge origin/devos
|
|
- git push origin core
|
|
|
|
- name: "Notify success"
|
|
image: plugins/matrix
|
|
when:
|
|
status:
|
|
- success
|
|
event:
|
|
- cron
|
|
- promote
|
|
target:
|
|
- upstream
|
|
depends_on:
|
|
- "Sync core with upstream"
|
|
settings:
|
|
homeserver: https://matrix.pub.solar
|
|
roomid: dfQBqwkhIzrFjMSsxy:pub.solar
|
|
username:
|
|
from_secret: matrix_username
|
|
password:
|
|
from_secret: matrix_password
|
|
template: Upstreaming devos into core succeeded.
|
|
|
|
- name: "Open pull request for failed merge"
|
|
image: nixery.dev/shell/tea
|
|
when:
|
|
status:
|
|
- failure
|
|
event:
|
|
- cron
|
|
- promote
|
|
target:
|
|
- upstream
|
|
depends_on:
|
|
- "Sync core with upstream"
|
|
environment:
|
|
TEA_CONFIG:
|
|
from_secret: tea_config
|
|
commands:
|
|
- mkdir -p ~/.config/tea
|
|
- echo "$$TEA_CONFIG" > ~/.config/tea/config.yml
|
|
- tea pulls create --base core --head devos
|
|
|
|
- name: "Notify failure"
|
|
image: plugins/matrix
|
|
when:
|
|
status:
|
|
- success
|
|
event:
|
|
- cron
|
|
- promote
|
|
target:
|
|
- upstream
|
|
depends_on:
|
|
- "Open pull request for failed merge"
|
|
settings:
|
|
homeserver: https://matrix.pub.solar
|
|
roomid: dfQBqwkhIzrFjMSsxy:pub.solar
|
|
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
|