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
|
2023-02-03 10:20:17 +00:00
|
|
|
image: rust:1.57
|
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
|
2021-11-11 16:55:59 +00:00
|
|
|
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
|
2021-11-02 21:49:00 +00:00
|
|
|
- cargo check --all-targets
|
|
|
|
|
|
|
|
- name: fmt
|
2023-02-03 10:20:17 +00:00
|
|
|
image: rust:1.57
|
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
|
2021-11-11 16:55:59 +00:00
|
|
|
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
|
2023-02-03 10:20:17 +00:00
|
|
|
- rustup component add rustfmt
|
2021-11-02 21:49:00 +00:00
|
|
|
- cargo fmt --all -- --check
|
|
|
|
|
|
|
|
- name: clippy
|
2023-02-03 10:20:17 +00:00
|
|
|
image: rust:1.57
|
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
|
2021-11-11 16:55:59 +00:00
|
|
|
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
|
2023-02-03 10:20:17 +00:00
|
|
|
- rustup component add clippy
|
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
|
2023-02-03 10:20:17 +00:00
|
|
|
image: rust:1.57
|
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
|
2021-11-11 16:55:59 +00:00
|
|
|
- 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
|
2023-02-03 10:20:17 +00:00
|
|
|
image: rust:1.57
|
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
|
2021-11-11 16:55:59 +00:00
|
|
|
- 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
|
2022-07-26 06:49:37 +00:00
|
|
|
- 0.4
|
2021-10-29 02:47:21 +00:00
|
|
|
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
|
|
|
|
...
|