garage/.drone.yml

96 lines
2.3 KiB
YAML
Raw Normal View History

2021-02-08 15:32:29 +00:00
kind: pipeline
name: default
2021-02-17 17:46:36 +00:00
workspace:
base: /drone
clone:
disable: true
2021-02-08 15:32:29 +00:00
steps:
2021-02-17 17:46:36 +00:00
- name: clone
image: alpine/git
commands:
- mkdir -p cargo
- git clone $DRONE_GIT_HTTP_URL
2021-02-17 17:46:36 +00:00
- cd garage
- git checkout $DRONE_COMMIT
2021-02-08 15:32:29 +00:00
- name: restore-cache
image: meltwater/drone-cache:dev
environment:
AWS_ACCESS_KEY_ID:
from_secret: cache_aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: cache_aws_secret_access_key
pull: true
settings:
restore: true
2021-02-10 12:11:13 +00:00
archive_format: "gzip"
2021-02-08 15:32:29 +00:00
bucket: drone-cache
2021-02-17 17:46:36 +00:00
cache_key: '{{ .Repo.Name }}_{{ checksum "garage/Cargo.lock" }}_{{ arch }}_{{ os }}_gzip'
2021-02-08 15:32:29 +00:00
region: garage
mount:
2021-02-17 17:46:36 +00:00
- 'garage/target'
- 'cargo/registry/index'
- 'cargo/registry/cache'
- 'cargo/bin'
- 'cargo/git/db'
2021-02-08 15:32:29 +00:00
path_style: true
endpoint: https://garage.deuxfleurs.fr
- name: build
2021-02-08 13:58:24 +00:00
image: rust:buster
2021-02-17 17:46:36 +00:00
environment:
CARGO_HOME: /drone/cargo
2021-02-08 13:58:24 +00:00
commands:
- apt-get update
2021-02-08 14:02:03 +00:00
- apt-get install --yes libsodium-dev
2021-02-17 17:46:36 +00:00
- pwd
- cd garage
2021-02-08 13:58:24 +00:00
- cargo build
2021-02-17 17:46:36 +00:00
- name: cargo-test
image: rust:buster
environment:
CARGO_HOME: /drone/cargo
commands:
- apt-get update
- apt-get install --yes libsodium-dev
- cd garage
- cargo test
2021-02-08 15:32:29 +00:00
- name: rebuild-cache
image: meltwater/drone-cache:dev
environment:
AWS_ACCESS_KEY_ID:
from_secret: cache_aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: cache_aws_secret_access_key
pull: true
settings:
rebuild: true
2021-02-10 11:53:00 +00:00
archive_format: "gzip"
2021-02-08 15:32:29 +00:00
bucket: drone-cache
2021-02-17 17:46:36 +00:00
cache_key: '{{ .Repo.Name }}_{{ checksum "garage/Cargo.lock" }}_{{ arch }}_{{ os }}_gzip'
2021-02-08 15:32:29 +00:00
region: garage
mount:
2021-02-17 17:46:36 +00:00
- 'garage/target'
- 'cargo/registry/index'
- 'cargo/registry/cache'
- 'cargo/git/db'
- 'cargo/bin'
2021-02-08 15:32:29 +00:00
path_style: true
endpoint: https://garage.deuxfleurs.fr
2021-02-17 17:46:36 +00:00
- name: smoke-test
image: rust:buster
environment:
CARGO_HOME: /drone/cargo
commands:
- apt-get update
- apt-get install --yes libsodium-dev awscli python-pip
- pip install s3cmd
- cd garage
- ./script/test-smoke.sh || (cat /tmp/garage.log; false)