Created
March 26, 2023 19:16
-
-
Save themegabyte/391256403f5170f00c64cc9523be63cf to your computer and use it in GitHub Desktop.
my drone CI config with Minio as Cache.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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