Skip to content

Instantly share code, notes, and snippets.

@themegabyte
Created March 26, 2023 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save themegabyte/391256403f5170f00c64cc9523be63cf to your computer and use it in GitHub Desktop.
Save themegabyte/391256403f5170f00c64cc9523be63cf to your computer and use it in GitHub Desktop.
my drone CI config with Minio as Cache.
---
kind: pipeline
type: docker
name: default
steps:
- name: ubuntu-ls
image: ubuntu
commands:
- ls -la
- name: test-minio
image: minio/mc
environment:
AWS_ACCESS_KEY_ID:
from_secret: cache_access_key
AWS_SECRET_ACCESS_KEY:
from_secret: cache_secret_key
commands:
- mc alias set cache http://minio-s3-cache:9000 $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY
- mc ls cache/drone-cache-bucket
- name: restore-cache
image: meltwater/drone-cache
environment:
AWS_ACCESS_KEY_ID:
from_secret: cache_access_key
AWS_SECRET_ACCESS_KEY:
from_secret: cache_secret_key
AWS_PLUGIN_PATH_STYLE: true
pull: true
settings:
restore: true
endpoint: http://minio-s3-cache:9000
# cache_key: '{{ .Commit.Branch }}-{{ checksum "go.mod" }}' # default if ommitted is {{ .Commit.Branch }}
bucket: drone-cache-bucket
region: eu-west-1
mount:
- "node_modules"
- name: list-node_modules-frpm-cache
image: ubuntu
commands:
- ls -la node_modules
- du -sh node_modules
- name: install-deps
image: node
commands:
- node --version
- npm --version
- npm install
- name: list-node_modules
image: ubuntu
commands:
- ls -la node_modules
- du -sh node_modules
- name: rebuild-cache
image: meltwater/drone-cache
environment:
AWS_ACCESS_KEY_ID:
from_secret: cache_access_key
AWS_SECRET_ACCESS_KEY:
from_secret: cache_secret_key
AWS_PLUGIN_PATH_STYLE: true
pull: true
settings:
rebuild: true
endpoint: http://minio-s3-cache:9000
# cache_key: '{{ .Commit.Branch }}-{{ checksum "go.mod" }}' # default if ommitted is {{ .Commit.Branch }}
bucket: drone-cache-bucket
region: eu-west-1
mount:
- "node_modules"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment