ipblc/.drone.yml

130 lines
2.7 KiB
YAML
Raw Normal View History

---
kind: pipeline
type: docker
2022-06-04 11:47:42 +02:00
name: default-amd64
platform:
os: linux
arch: amd64
steps:
- name: test and build
image: rust:1
commands:
- apt-get update -y
2023-05-13 10:26:20 +02:00
- apt-get install -y libnftnl-dev libmnl-dev
- cargo build --verbose --all
- cargo test --verbose --all
2022-06-04 15:09:55 +02:00
volumes:
- name: cargo
path: /usr/local/cargo/registry
- name: apt
path: /var/cache/apt
when:
2022-06-04 15:09:55 +02:00
event:
2022-08-28 18:38:46 +02:00
exclude:
- tag
- name: release
image: rust:1
commands:
- apt-get update -y
2023-05-13 10:26:20 +02:00
- apt-get install -y libnftnl-dev libmnl-dev
- cargo build --release --verbose --all
- cd target/release
2022-06-04 11:55:20 +02:00
- tar -czvf ipblc-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz ipblc
2022-06-04 15:09:55 +02:00
volumes:
- name: cargo
path: /usr/local/cargo/registry
- name: apt
path: /var/cache/apt
when:
2022-06-04 15:09:55 +02:00
event:
- tag
- name: publish
image: plugins/gitea-release
settings:
base_url: https://git.paulbsd.com
api_key:
from_secret: gitea_token
files: "target/release/*.tar.gz"
2023-07-01 15:48:21 +02:00
#checksum:
# - sha256
# - sha512
environment:
PLUGIN_TITLE: ""
when:
2022-06-04 15:09:55 +02:00
event:
- tag
volumes:
- name: cargo
host:
path: /home/drone/cache/cargo
- name: apt
host:
path: /home/drone/cache/apt
2022-06-04 11:47:42 +02:00
---
kind: pipeline
type: docker
name: default-arm64
platform:
os: linux
arch: arm64
steps:
- name: test and build
image: rust:1
commands:
- apt-get update -y
2023-05-13 10:26:20 +02:00
- apt-get install -y libnftnl-dev libmnl-dev
2022-06-04 11:47:42 +02:00
- cargo build --verbose --all
- cargo test --verbose --all
2022-06-04 14:40:35 +02:00
volumes:
- name: cargo
path: /usr/local/cargo/registry
- name: apt
path: /var/cache/apt
2022-06-04 11:47:42 +02:00
when:
2022-06-04 15:09:55 +02:00
event:
2022-08-28 18:38:46 +02:00
exclude:
- tag
2022-06-04 11:47:42 +02:00
- name: release
image: rust:1
commands:
- apt-get update -y
2023-05-13 10:26:20 +02:00
- apt-get install -y libnftnl-dev libmnl-dev
2022-06-04 11:47:42 +02:00
- cargo build --release --verbose --all
- cd target/release
2022-06-04 11:55:20 +02:00
- tar -czvf ipblc-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz ipblc
2022-06-04 15:09:55 +02:00
volumes:
- name: cargo
path: /usr/local/cargo/registry
- name: apt
path: /var/cache/apt
2022-06-04 11:47:42 +02:00
when:
2022-06-04 15:09:55 +02:00
event:
- tag
2022-06-04 11:47:42 +02:00
- name: publish
image: plugins/gitea-release
settings:
base_url: https://git.paulbsd.com
api_key:
from_secret: gitea_token
files: "target/release/*.tar.gz"
2023-07-01 15:48:21 +02:00
#checksum:
# - sha256
# - sha512
2022-06-04 11:47:42 +02:00
environment:
PLUGIN_TITLE: ""
when:
2022-06-04 15:09:55 +02:00
event:
- tag
2022-06-04 14:40:35 +02:00
volumes:
- name: cargo
host:
path: /home/drone/cache/cargo
- name: apt
host:
path: /home/drone/cache/apt