epp-client/.drone.yml

117 lines
3.1 KiB
YAML
Raw Normal View History

2021-07-27 09:51:49 +00:00
---
kind: pipeline
name: epp-client
platform:
os: linux
arch: amd64
steps:
2021-11-02 21:49:00 +00:00
- name: check
2021-11-12 08:05:03 +00:00
image: ayravat/rust:1.56.1-ci
2021-11-02 21:49:00 +00:00
volumes:
- name: target
path: /tmp/cargo-target
- name: cache
path: /tmp/cargo
commands:
2021-12-02 10:34:13 +00:00
- export CACHE_DIR=$(echo -n "$DRONE_COMMIT_LINK" | md5sum | cut -f1 -d" ")
- export CARGO_HOME=/tmp/cargo/$CACHE_DIR
- export CARGO_TARGET_DIR=/tmp/cargo-target/$CACHE_DIR
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
2021-11-02 21:49:00 +00:00
- cargo check --all-targets
- name: fmt
2021-11-12 08:05:03 +00:00
image: ayravat/rust:1.56.1-ci
2021-11-02 21:49:00 +00:00
volumes:
- name: target
path: /tmp/cargo-target
- name: cache
path: /tmp/cargo
commands:
2021-12-02 10:34:13 +00:00
- export CACHE_DIR=$(echo -n "$DRONE_COMMIT_LINK" | md5sum | cut -f1 -d" ")
- export CARGO_HOME=/tmp/cargo/$CACHE_DIR
- export CARGO_TARGET_DIR=/tmp/cargo-target/$CACHE_DIR
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
2021-11-02 21:49:00 +00:00
- cargo fmt --all -- --check
- name: clippy
2021-11-12 08:05:03 +00:00
image: ayravat/rust:1.56.1-ci
2021-11-02 21:49:00 +00:00
volumes:
- name: target
path: /tmp/cargo-target
- name: cache
path: /tmp/cargo
commands:
2021-12-02 10:34:13 +00:00
- export CACHE_DIR=$(echo -n "$DRONE_COMMIT_LINK" | md5sum | cut -f1 -d" ")
- export CARGO_HOME=/tmp/cargo/$CACHE_DIR
- export CARGO_TARGET_DIR=/tmp/cargo-target/$CACHE_DIR
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
2021-11-02 21:49:00 +00:00
- cargo clippy --workspace --all-targets -- -D warnings
2021-07-27 09:51:49 +00:00
- name: test
2021-11-12 08:05:03 +00:00
image: ayravat/rust:1.56.1-ci
2021-07-27 09:51:49 +00:00
volumes:
- name: target
path: /tmp/cargo-target
- name: cache
path: /tmp/cargo
commands:
2021-12-02 10:34:13 +00:00
- export CACHE_DIR=$(echo -n "$DRONE_COMMIT_LINK" | md5sum | cut -f1 -d" ")
- export CARGO_HOME=/tmp/cargo/$CACHE_DIR
- export CARGO_TARGET_DIR=/tmp/cargo-target/$CACHE_DIR
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
2021-11-05 23:26:58 +00:00
- cargo test -- --nocapture
2021-07-27 09:51:49 +00:00
- name: crates.io
2021-11-12 08:05:03 +00:00
image: ayravat/rust:1.56.1-docker
2021-07-27 09:51:49 +00:00
volumes:
- name: target
path: /tmp/cargo-target
- name: cache
path: /tmp/cargo
2021-11-24 14:55:49 +00:00
environment:
CARGO_TOKEN:
from_secret: cargo_token
2021-07-27 09:51:49 +00:00
commands:
2021-12-02 10:34:13 +00:00
- export CACHE_DIR=$(echo -n "$DRONE_COMMIT_LINK" | md5sum | cut -f1 -d" ")
- export CARGO_HOME=/tmp/cargo/$CACHE_DIR
- export CARGO_TARGET_DIR=/tmp/cargo-target/$CACHE_DIR
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
2021-11-12 09:30:32 +00:00
- cargo publish --token $CARGO_TOKEN
2021-07-27 09:51:49 +00:00
when:
2021-11-12 08:05:03 +00:00
branch:
- 0.2
- 0.3
event: push
2021-07-27 09:51:49 +00:00
2021-11-24 11:37:36 +00:00
- name: notify
image: drillster/drone-email
environment:
2021-11-24 14:55:49 +00:00
PLUGIN_HOST:
from_secret: mail_host
PLUGIN_FROM:
from_secret: mail_sender
PLUGIN_FROM_NAME:
from_secret: mail_sender_name
PLUGIN_PORT:
from_secret: mail_port
PLUGIN_USERNAME:
from_secret: mail_user
PLUGIN_PASSWORD:
from_secret: mail_password
PLUGIN_RECIPIENTS:
from_secret: mail_recipients
2021-11-24 11:37:36 +00:00
when:
status:
- failure
2021-07-27 09:51:49 +00:00
volumes:
- name: target
host:
path: /var/drone/cache/epp-client-target
- name: cache
host:
path: /var/drone/cache/epp-client-cache
...