chore: don't cache node_modules

This commit is contained in:
kolaente 2022-09-21 20:29:29 +02:00
parent e5d04c98da
commit b542221dac
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -20,24 +20,24 @@ services:
steps: steps:
# Disabled until we figure out why it is so slow # Disabled until we figure out why it is so slow
- name: restore-cache # - name: restore-cache
image: meltwater/drone-cache:dev # image: meltwater/drone-cache:dev
pull: true # pull: true
environment: # environment:
AWS_ACCESS_KEY_ID: # AWS_ACCESS_KEY_ID:
from_secret: cache_aws_access_key_id # from_secret: cache_aws_access_key_id
AWS_SECRET_ACCESS_KEY: # AWS_SECRET_ACCESS_KEY:
from_secret: cache_aws_secret_access_key # from_secret: cache_aws_secret_access_key
settings: # settings:
debug: true # debug: true
restore: true # restore: true
bucket: kolaente.dev-drone-dependency-cache # bucket: kolaente.dev-drone-dependency-cache
endpoint: https://s3.fr-par.scw.cloud # endpoint: https://s3.fr-par.scw.cloud
region: fr-par # region: fr-par
path_style: true # path_style: true
cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}' # cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
mount: # mount:
- .cache # - .cache
- name: dependencies - name: dependencies
image: node:18-alpine image: node:18-alpine
@ -48,8 +48,8 @@ steps:
commands: commands:
- corepack enable && corepack prepare pnpm@7.9.3 --activate && pnpm config set store-dir .cache/pnpm - corepack enable && corepack prepare pnpm@7.9.3 --activate && pnpm config set store-dir .cache/pnpm
- pnpm install --fetch-timeout 100000 - pnpm install --fetch-timeout 100000
depends_on: # depends_on:
- restore-cache # - restore-cache
- name: lint - name: lint
image: node:18-alpine image: node:18-alpine
@ -113,25 +113,25 @@ steps:
depends_on: depends_on:
- build-prod - build-prod
- name: rebuild-cache # - name: rebuild-cache
image: meltwater/drone-cache:dev # image: meltwater/drone-cache:dev
pull: true # pull: true
environment: # environment:
AWS_ACCESS_KEY_ID: # AWS_ACCESS_KEY_ID:
from_secret: cache_aws_access_key_id # from_secret: cache_aws_access_key_id
AWS_SECRET_ACCESS_KEY: # AWS_SECRET_ACCESS_KEY:
from_secret: cache_aws_secret_access_key # from_secret: cache_aws_secret_access_key
settings: # settings:
rebuild: true # rebuild: true
bucket: kolaente.dev-drone-dependency-cache # bucket: kolaente.dev-drone-dependency-cache
endpoint: https://s3.fr-par.scw.cloud # endpoint: https://s3.fr-par.scw.cloud
region: fr-par # region: fr-par
path_style: true # path_style: true
cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}' # cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
mount: # mount:
- .cache # - .cache
depends_on: # depends_on:
- dependencies # - dependencies
- name: deploy-preview - name: deploy-preview
image: node:18-alpine image: node:18-alpine
@ -176,23 +176,23 @@ steps:
commands: commands:
- git fetch --tags - git fetch --tags
- name: restore-cache # - name: restore-cache
image: meltwater/drone-cache:dev # image: meltwater/drone-cache:dev
pull: true # pull: true
environment: # environment:
AWS_ACCESS_KEY_ID: # AWS_ACCESS_KEY_ID:
from_secret: cache_aws_access_key_id # from_secret: cache_aws_access_key_id
AWS_SECRET_ACCESS_KEY: # AWS_SECRET_ACCESS_KEY:
from_secret: cache_aws_secret_access_key # from_secret: cache_aws_secret_access_key
settings: # settings:
restore: true # restore: true
bucket: kolaente.dev-drone-dependency-cache # bucket: kolaente.dev-drone-dependency-cache
endpoint: https://s3.fr-par.scw.cloud # endpoint: https://s3.fr-par.scw.cloud
region: fr-par # region: fr-par
path_style: true # path_style: true
cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}' # cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
mount: # mount:
- .cache # - .cache
- name: build - name: build
image: node:18-alpine image: node:18-alpine
@ -207,8 +207,8 @@ steps:
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json" - "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
- pnpm run build - pnpm run build
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing - sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
depends_on: # depends_on:
- restore-cache # - restore-cache
- name: static - name: static
image: kolaente/zip image: kolaente/zip
@ -252,23 +252,23 @@ steps:
commands: commands:
- git fetch --tags - git fetch --tags
- name: restore-cache # - name: restore-cache
image: meltwater/drone-cache:dev # image: meltwater/drone-cache:dev
pull: true # pull: true
environment: # environment:
AWS_ACCESS_KEY_ID: # AWS_ACCESS_KEY_ID:
from_secret: cache_aws_access_key_id # from_secret: cache_aws_access_key_id
AWS_SECRET_ACCESS_KEY: # AWS_SECRET_ACCESS_KEY:
from_secret: cache_aws_secret_access_key # from_secret: cache_aws_secret_access_key
settings: # settings:
restore: true # restore: true
bucket: kolaente.dev-drone-dependency-cache # bucket: kolaente.dev-drone-dependency-cache
endpoint: https://s3.fr-par.scw.cloud # endpoint: https://s3.fr-par.scw.cloud
region: fr-par # region: fr-par
path_style: true # path_style: true
cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}' # cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
mount: # mount:
- .cache # - .cache
- name: build - name: build
image: node:18-alpine image: node:18-alpine
@ -283,8 +283,8 @@ steps:
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json" - "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
- pnpm run build - pnpm run build
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing - sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
depends_on: # depends_on:
- restore-cache # - restore-cache
- name: static - name: static
image: kolaente/zip image: kolaente/zip