misakanet-config/.drone.yml

57 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2022-12-27 00:42:29 +00:00
kind: pipeline
type: docker
name: default
2023-01-01 13:27:41 +00:00
platform:
os: linux
arch: arm64
2022-12-28 08:46:22 +00:00
trigger:
event:
include:
- push
- pull_request
2022-12-27 00:42:29 +00:00
steps:
- name: test
2023-01-10 13:36:40 +00:00
privileged: true
2022-12-27 00:42:29 +00:00
image: alpine:latest
commands:
- sed -i '1i\include "./config-example.conf";' bird.conf
2023-01-10 13:36:40 +00:00
- apk add bird iproute2
- ip link add tunnel-dum0 type dummy
2022-12-27 00:42:29 +00:00
- bird -p -c ./bird.conf
2022-12-28 08:46:22 +00:00
---
kind: pipeline
type: docker
name: updateFilter
2023-01-01 13:27:41 +00:00
platform:
os: linux
arch: arm64
2022-12-28 08:46:22 +00:00
trigger:
branch:
- main
steps:
- name: update filter
image: debian:latest
commands:
2023-02-05 19:00:00 +00:00
- apt-get update -y && apt-get install bgpq4 git -y
2023-03-03 15:39:35 +00:00
- echo "define $(bgpq4 -tbl DOWNSTREAM_ASN AS-NET186 -S RIPE,ARIN,APNIC,AFRINIC,LACNIC -L 6)" > util/irr-filter.conf
2023-03-03 15:26:41 +00:00
- echo "define $(bgpq4 -6bl DOWNSTREAM_PREFIXES AS-NET186 -S RIPE,ARIN,APNIC,AFRINIC,LACNIC,RPKI -A -R48)" >> util/irr-filter.conf
2023-02-01 08:34:50 +00:00
- echo "net.186526.xyz" >> CNAME
2023-02-05 19:00:00 +00:00
- git rm -f ansible
2022-12-28 08:46:22 +00:00
- name: push to repo
2023-01-01 13:27:41 +00:00
image: appleboy/drone-git-push:0.2.3-linux-arm64
2022-12-28 08:46:22 +00:00
settings:
branch: production
remote: git@direct-git.186526.xyz:186526/net186-config.git
force: true
commit_message: "[CI] Update: update filter"
commit: true
ssh_key:
from_secret: ssh_private_key