forked from pub-solar/os
Merge branch 'core' into teutat3s
This commit is contained in:
commit
9897fb174a
96
.drone.yml
96
.drone.yml
|
@ -1,23 +1,91 @@
|
||||||
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: api
|
name: Upstreaming
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Sync upstream and try PR"
|
- name: "Sync upstream to local"
|
||||||
image: docker.b12f.io/pub-solar/minimal-git:latest
|
image: alpine/git
|
||||||
settings:
|
when:
|
||||||
registry: docker.b12f.io
|
event:
|
||||||
repo: docker.b12f.io/pub-solar/minimal-git
|
- cron
|
||||||
username:
|
- promote
|
||||||
from_secret: docker_username
|
target:
|
||||||
password:
|
- upstream
|
||||||
from_secret: docker_password
|
branch:
|
||||||
|
- core
|
||||||
environment:
|
environment:
|
||||||
GITEA_SSH_KEY:
|
GITEA_SSH_KEY:
|
||||||
from_secret: gitea_ssh_key
|
from_secret: gitea_ssh_key
|
||||||
commands:
|
commands:
|
||||||
- echo $GITEA_SSH_KEY > ~/.ssh/id_rsa
|
- ./.drone/setup_ssh.sh
|
||||||
- git clone -b core git@git.b12f.io:pub-solar/os
|
- git fetch
|
||||||
- git remote add devos https://github.com/divnix/devos.git
|
- 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
|
||||||
- git fetch --all
|
- git fetch --all
|
||||||
- git rebase devos/core
|
- git merge -X theirs devos/core
|
||||||
|
- git push origin devos
|
||||||
|
|
||||||
|
- name: "Sync branch with upstream"
|
||||||
|
image: alpine/git
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
event:
|
||||||
|
- cron
|
||||||
|
- promote
|
||||||
|
target:
|
||||||
|
- upstream
|
||||||
|
environment:
|
||||||
|
GITEA_SSH_KEY:
|
||||||
|
from_secret: gitea_ssh_key
|
||||||
|
commands:
|
||||||
|
- ./.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
|
||||||
|
- promote
|
||||||
|
target:
|
||||||
|
- upstream
|
||||||
|
branch:
|
||||||
|
- core
|
||||||
|
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 matrix"
|
||||||
|
image: plugins/matrix
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
event:
|
||||||
|
- cron
|
||||||
|
- promote
|
||||||
|
target:
|
||||||
|
- upstream
|
||||||
|
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
|
||||||
|
hmac: b7ad6e3b722b175ffdffd610784fbaf8d675278a64c7e3c62dc5a05b8ae3e2ad
|
||||||
|
|
||||||
|
...
|
||||||
|
|
11
.drone/setup_ssh.sh
Executable file
11
.drone/setup_ssh.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Setup ssh inside container
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "$GITEA_SSH_KEY" > ~/.ssh/id_rsa
|
||||||
|
echo "[git.b12f.io]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ4uaREL7acSSCNAX+voDYl1Kj7JipP62fR5x1UyGP9u" >> ~/.ssh/known_hosts
|
||||||
|
echo "Host git.b12f.io" >> ~/.ssh/config
|
||||||
|
echo " Port 2222" >> ~/.ssh/config
|
||||||
|
chmod -R 600 ~/.ssh
|
12
.drone/upstream-branch.sh
Executable file
12
.drone/upstream-branch.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
LOCAL="$DRONE_BRANCH"
|
||||||
|
[ "$LOCAL" = "core" ] && UPSTREAM=origin/devos || UPSTREAM=origin/core
|
||||||
|
|
||||||
|
git fetch --all
|
||||||
|
git checkout "$LOCAL"
|
||||||
|
git merge "$UPSTREAM"
|
||||||
|
git push origin "$LOCAL"
|
16
.github/ISSUE_TEMPLATE/upstream_notice.md
vendored
Normal file
16
.github/ISSUE_TEMPLATE/upstream_notice.md
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
name: Upstream notice (Issues or Changes)
|
||||||
|
about: Create an upstream notice to help our research
|
||||||
|
title: '[ <put the upstream project> ]: <topic>'
|
||||||
|
labels: 'upstream'
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Link
|
||||||
|
<!-- just place a link to the upstream issue, or PR -->
|
||||||
|
|
||||||
|
|
||||||
|
## Context
|
||||||
|
<!-- We want to make this as cheap for you as possible.
|
||||||
|
Context is not required but helpful -->
|
Loading…
Reference in a new issue