aboutsummaryrefslogtreecommitdiff
path: root/.drone.yml
diff options
context:
space:
mode:
Diffstat (limited to '.drone.yml')
-rw-r--r--.drone.yml70
1 files changed, 43 insertions, 27 deletions
diff --git a/.drone.yml b/.drone.yml
index 15582cc3..e6e1fb66 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -2,20 +2,9 @@ kind: pipeline
name: default
workspace:
- base: /drone
-
-clone:
- disable: true
+ base: /drone/garage
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
image: meltwater/drone-cache:dev
environment:
@@ -28,14 +17,14 @@ steps:
restore: true
archive_format: "gzip"
bucket: drone-cache
- cache_key: '{{ .Repo.Name }}_{{ checksum "garage/Cargo.lock" }}_{{ arch }}_{{ os }}_gzip'
+ cache_key: '{{ .Repo.Name }}_{{ checksum "Cargo.lock" }}_{{ arch }}_{{ os }}_gzip'
region: garage
mount:
- - 'garage/target'
- - 'cargo/registry/index'
- - 'cargo/registry/cache'
- - 'cargo/git/db'
- - 'cargo/bin'
+ - 'target'
+ - '/drone/cargo/registry/index'
+ - '/drone/cargo/registry/cache'
+ - '/drone/cargo/bin'
+ - '/drone/cargo/git/db'
path_style: true
endpoint: https://garage.deuxfleurs.fr
@@ -47,7 +36,6 @@ steps:
- apt-get update
- apt-get install --yes libsodium-dev
- pwd
- - cd garage
- cargo build
- name: cargo-test
@@ -57,7 +45,6 @@ steps:
commands:
- apt-get update
- apt-get install --yes libsodium-dev
- - cd garage
- cargo test
- name: rebuild-cache
@@ -72,14 +59,14 @@ steps:
rebuild: true
archive_format: "gzip"
bucket: drone-cache
- cache_key: '{{ .Repo.Name }}_{{ checksum "garage/Cargo.lock" }}_{{ arch }}_{{ os }}_gzip'
+ cache_key: '{{ .Repo.Name }}_{{ checksum "Cargo.lock" }}_{{ arch }}_{{ os }}_gzip'
region: garage
mount:
- - 'garage/target'
- - 'cargo/registry/index'
- - 'cargo/registry/cache'
- - 'cargo/git/db'
- - 'cargo/bin'
+ - 'target'
+ - '/drone/cargo/registry/index'
+ - '/drone/cargo/registry/cache'
+ - '/drone/cargo/git/db'
+ - '/drone/cargo/bin'
path_style: true
endpoint: https://garage.deuxfleurs.fr
@@ -91,5 +78,34 @@ steps:
- 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)
+
+---
+kind: pipeline
+name: website
+
+steps:
+ - name: build
+ image: hrektts/mdbook
+ commands:
+ - cd doc/book
+ - mdbook build
+
+ - name: upload
+ image: plugins/s3
+ settings:
+ bucket: garagehq.deuxfleurs.fr
+ access_key:
+ from_secret: garagehq_aws_access_key_id
+ secret_key:
+ from_secret: garagehq_aws_secret_access_key
+ source: doc/book/book/**/*
+ strip_prefix: doc/book/book/
+ target: /
+ path_style: true
+ endpoint: https://garage.deuxfleurs.fr
+ region: garage
+ when:
+ branch:
+ - main
+