CI improvements
This commit is contained in:
parent
a3d9d0faac
commit
b5dc4d33a9
1 changed files with 51 additions and 4 deletions
55
.drone.yml
55
.drone.yml
|
@ -1,7 +1,21 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /drone
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: clone
|
||||||
|
image: alpine/git
|
||||||
|
commands:
|
||||||
|
- mkdir -p cargo
|
||||||
|
- git clone https://git.deuxfleurs.fr/Deuxfleurs/garage.git
|
||||||
|
- cd garage
|
||||||
|
- git checkout $DRONE_COMMIT
|
||||||
|
|
||||||
- name: restore-cache
|
- name: restore-cache
|
||||||
image: meltwater/drone-cache:dev
|
image: meltwater/drone-cache:dev
|
||||||
environment:
|
environment:
|
||||||
|
@ -14,20 +28,38 @@ steps:
|
||||||
restore: true
|
restore: true
|
||||||
archive_format: "gzip"
|
archive_format: "gzip"
|
||||||
bucket: drone-cache
|
bucket: drone-cache
|
||||||
cache_key: '{{ .Repo.Name }}_{{ checksum "Cargo.lock" }}_{{ arch }}_{{ os }}_gzip'
|
cache_key: '{{ .Repo.Name }}_{{ checksum "garage/Cargo.lock" }}_{{ arch }}_{{ os }}_gzip'
|
||||||
region: garage
|
region: garage
|
||||||
mount:
|
mount:
|
||||||
- 'target'
|
- 'garage/target'
|
||||||
|
- 'cargo/registry/index'
|
||||||
|
- 'cargo/registry/cache'
|
||||||
|
- 'cargo/git/db'
|
||||||
|
- 'cargo/bin'
|
||||||
path_style: true
|
path_style: true
|
||||||
endpoint: https://garage.deuxfleurs.fr
|
endpoint: https://garage.deuxfleurs.fr
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: rust:buster
|
image: rust:buster
|
||||||
|
environment:
|
||||||
|
CARGO_HOME: /drone/cargo
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install --yes libsodium-dev
|
- apt-get install --yes libsodium-dev
|
||||||
|
- pwd
|
||||||
|
- cd garage
|
||||||
- cargo build
|
- cargo build
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
- name: rebuild-cache
|
- name: rebuild-cache
|
||||||
image: meltwater/drone-cache:dev
|
image: meltwater/drone-cache:dev
|
||||||
environment:
|
environment:
|
||||||
|
@ -40,9 +72,24 @@ steps:
|
||||||
rebuild: true
|
rebuild: true
|
||||||
archive_format: "gzip"
|
archive_format: "gzip"
|
||||||
bucket: drone-cache
|
bucket: drone-cache
|
||||||
cache_key: '{{ .Repo.Name }}_{{ checksum "Cargo.lock" }}_{{ arch }}_{{ os }}_gzip'
|
cache_key: '{{ .Repo.Name }}_{{ checksum "garage/Cargo.lock" }}_{{ arch }}_{{ os }}_gzip'
|
||||||
region: garage
|
region: garage
|
||||||
mount:
|
mount:
|
||||||
- 'target'
|
- 'garage/target'
|
||||||
|
- 'cargo/registry/index'
|
||||||
|
- 'cargo/registry/cache'
|
||||||
|
- 'cargo/git/db'
|
||||||
|
- 'cargo/bin'
|
||||||
path_style: true
|
path_style: true
|
||||||
endpoint: https://garage.deuxfleurs.fr
|
endpoint: https://garage.deuxfleurs.fr
|
||||||
|
|
||||||
|
- 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)
|
||||||
|
|
Loading…
Reference in a new issue