ci: add s3 cache
ci/woodpecker/push/woodpecker Pipeline was successful Details

Tomáš Mládek 2023-08-12 20:39:52 +02:00
parent 1067c29c42
commit e5fe319ef7
1 changed files with 43 additions and 1 deletions

View File

@ -1,4 +1,25 @@
pipeline:
cache:get:
image: meltwater/drone-cache:v1
pull: true
settings:
restore: true
endpoint:
from_secret: S3_ENDPOINT
access-key:
from_secret: S3_ACCESS_KEY
secret-key:
from_secret: S3_SECRET_KEY
bucket: "upend-ci-cache"
cache_key: "{{ .Commit.Branch }}"
path-style: true
mount:
- ".cargo"
- ".pnpm"
secrets: [S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY]
when:
event: push
prepare:cache:frontend:
group: init
image: albedo.lan:5000/upend-node:latest
@ -13,7 +34,7 @@ pipeline:
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
commands:
- cp -r /usr/local/cargo $CARGO_HOME
- test -d $CARGO_HOME || cp -r /usr/local/cargo $CARGO_HOME
prepare:build:wasmlib:
image: albedo.lan:5000/upend-rust:latest
@ -112,6 +133,27 @@ pipeline:
# volumes:
# - rust_registry:/usr/local/cargo
cache:push:
image: meltwater/drone-cache:v1
pull: true
settings:
rebuild: true
endpoint:
from_secret: S3_ENDPOINT
access-key:
from_secret: S3_ACCESS_KEY
secret-key:
from_secret: S3_SECRET_KEY
bucket: "upend-ci-cache"
cache_key: "{{ .Commit.Branch }}"
path-style: true
mount:
- ".cargo"
- ".pnpm"
secrets: [S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY]
when:
event: push
package:
image: albedo.lan:5000/upend-deploy:latest
pull: true