ci: enable minio cache
ci/woodpecker/push/woodpecker Pipeline was successful Details

Squashed commit of the following:

commit e14be61983115bf4ff75e9cf681850a846f9c356
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sun Aug 13 08:11:32 2023 +0200

    ci: wrap up cache

commit 968fa47916
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sun Aug 13 07:56:41 2023 +0200

    ci, wip: fix cargo cache, env expansion

commit 9f6e9992b2
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 21:07:21 2023 +0200

    wip: upload test

commit e5fe319ef7
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 20:39:52 2023 +0200

    ci: add s3 cache
feat/type-attributes
Tomáš Mládek 2023-08-13 08:11:58 +02:00
parent 1067c29c42
commit 04cbf7e7af
1 changed files with 52 additions and 12 deletions

View File

@ -1,26 +1,47 @@
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
region: anabasis
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
pull: true
commands:
- pnpm config set store-dir $PWD/.pnpm
- pnpm config set store-dir $CI_WORKSPACE/.pnpm
- mkdir -p $CI_WORKSPACE/.pnpm
prepare:cache:backend:
group: init
image: albedo.lan:5000/upend-rust:latest
pull: true
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
commands:
- cp -r /usr/local/cargo $CARGO_HOME
- export CARGO_HOME=$CI_WORKSPACE/.cargo
- test -d $CARGO_HOME || cp -vr /usr/local/cargo $CARGO_HOME
prepare:build:wasmlib:
image: albedo.lan:5000/upend-rust:latest
pull: true
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
commands:
- export CARGO_HOME=$CI_WORKSPACE/.cargo
- rustc --version && cargo --version
- task build:wasmlib
# volumes:
@ -30,9 +51,8 @@ pipeline:
group: build
image: albedo.lan:5000/upend-rust:latest
pull: true
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
commands:
- export CARGO_HOME=$CI_WORKSPACE/.cargo
- rustc --version && cargo --version
- task build:backend
# volumes:
@ -50,9 +70,8 @@ pipeline:
group: lint
image: albedo.lan:5000/upend-rust:latest
pull: true
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
commands:
- export CARGO_HOME=$CI_WORKSPACE/.cargo
- rustup component add clippy
- task lint:backend
- git status -vvv
@ -105,13 +124,34 @@ pipeline:
group: test
image: albedo.lan:5000/upend-rust:latest
pull: true
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
commands:
- export CARGO_HOME=$CI_WORKSPACE/.cargo
- task test:backend
# 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
region: anabasis
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