s0-meter/.drone.yml

114 lines
2.3 KiB
YAML
Raw Permalink Normal View History

2021-03-08 00:25:14 +01:00
kind: pipeline
2021-03-08 00:46:13 +01:00
name: default
2021-03-08 00:25:14 +01:00
volumes:
- name: target
temp: {}
2021-03-08 01:23:34 +01:00
steps:
# - name: preview
# image: rust:1.50-musl
# volumes:
# - name: target
# path: /drone/src/target
# commands:
# - env
# - pwd
# - ls
# - ls target
- name: build_test
2021-03-13 15:11:49 +01:00
image: drone_rust:1.50-musl
volumes:
- name: target
path: /drone/src/target
2021-03-11 01:16:46 +01:00
commands:
- cargo build --release
2021-03-08 01:23:34 +01:00
- name: run_test
2021-03-13 15:11:49 +01:00
image: drone_rust:1.50-musl
volumes:
- name: target
path: /drone/src/target
commands:
- cargo test --release --no-fail-fast -- --test-threads 1
- name: build_release
image: drone_rust:1.50-musl
volumes:
- name: target
path: /drone/src/target
commands:
- cargo build --release --target armv7-unknown-linux-musleabihf --features "rppal"
- grep '^version = ' Cargo.toml | cut -f2 -d\" > target/VERSION
when:
event: tag
- name: show_version
image: alpine
volumes:
- name: target
path: /drone/src/target
commands:
# - grep '^version = ' Cargo.toml | cut -f2 -d\" > target/VERSION
- cat target/VERSION
- name: bundle_deployment
2021-03-13 15:22:02 +01:00
image: alpine
volumes:
- name: target
path: /drone/src/target
commands:
- cp target/armv7-unknown-linux-musleabihf/release/s0_meter target/s0_meter-armhf-$(cat target/VERSION)
when:
event: tag
- name: show_results
image: alpine
volumes:
- name: target
path: /drone/src/target
commands:
- ls -l target
- ls -l target/release
- ls -l target/armv7-unknown-linux-musleabihf
- ls -l target/armv7-unknown-linux-musleabihf/release
- ls -l target
2021-03-13 15:22:02 +01:00
when:
event: tag
2021-03-13 15:22:02 +01:00
- name: deploy
image: plugins/gitea-release
volumes:
- name: target
path: /drone/src/target
settings:
api_key:
from_secret: GITEA_TOKEN
baseurl: https://gitea.kube-it.default
2021-03-13 15:22:02 +01:00
files: /drone/src/target/s0_meter-*
when:
event: tag
2021-03-08 00:46:13 +01:00
# kind: pipeline
# type: exec
# name: toolchain
# steps:
# - name: build
# commands:
# - pwd
# - ls -lh
2021-03-08 00:35:00 +01:00
# - docker build -t drone_rust:1.50-musl .
2021-03-08 00:25:14 +01:00
2021-03-08 00:35:00 +01:00
# ---
# kind: pipeline
# type: docker
# name: s0_meter
2021-03-08 00:25:14 +01:00
2021-03-08 00:35:00 +01:00
# steps:
# - name: checkout
# image: drone_rust:1.50-musl
# commands:
# - cargo build --release --target=armv7-unknown-linux-musleabihf --features="rppal"