chore(gitlab-ci): more precise caching
This commit is contained in:
parent
f0074c8ac8
commit
d71aa7d2de
@ -7,14 +7,6 @@ workflow:
|
|||||||
default:
|
default:
|
||||||
image:
|
image:
|
||||||
name: fpco/stack-build:lts-16.31
|
name: fpco/stack-build:lts-16.31
|
||||||
cache: &global_cache
|
|
||||||
key: default
|
|
||||||
paths:
|
|
||||||
- .npm
|
|
||||||
- node_modules
|
|
||||||
- .stack
|
|
||||||
- .stack-work
|
|
||||||
- .well-known-cache
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
STACK_ROOT: "${CI_PROJECT_DIR}/.stack"
|
STACK_ROOT: "${CI_PROJECT_DIR}/.stack"
|
||||||
@ -43,6 +35,13 @@ stages:
|
|||||||
# - deploy
|
# - deploy
|
||||||
|
|
||||||
npm install:
|
npm install:
|
||||||
|
cache:
|
||||||
|
- &npm-cache
|
||||||
|
key: default-npm
|
||||||
|
paths:
|
||||||
|
- .npm
|
||||||
|
- node_modules
|
||||||
|
|
||||||
stage: setup
|
stage: setup
|
||||||
script:
|
script:
|
||||||
- ./.npmrc.gup
|
- ./.npmrc.gup
|
||||||
@ -69,6 +68,12 @@ npm install:
|
|||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
frontend:build:
|
frontend:build:
|
||||||
|
cache:
|
||||||
|
- &frontend-cache
|
||||||
|
key: default-frontend
|
||||||
|
paths:
|
||||||
|
- .well-known-cache
|
||||||
|
|
||||||
stage: frontend:build
|
stage: frontend:build
|
||||||
script:
|
script:
|
||||||
- npm run frontend:build
|
- npm run frontend:build
|
||||||
@ -98,6 +103,13 @@ frontend:lint:
|
|||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
yesod:build:dev:
|
yesod:build:dev:
|
||||||
|
cache:
|
||||||
|
- &stack-dev-cache
|
||||||
|
key: default-stack-dev
|
||||||
|
paths:
|
||||||
|
- .stack
|
||||||
|
- .stack-work
|
||||||
|
|
||||||
stage: yesod:build
|
stage: yesod:build
|
||||||
script:
|
script:
|
||||||
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic --no-strip --no-run-tests
|
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic --no-strip --no-run-tests
|
||||||
@ -136,6 +148,13 @@ yesod:build:dev:
|
|||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
yesod:build:
|
yesod:build:
|
||||||
|
cache:
|
||||||
|
- &stack-cache
|
||||||
|
key: default-stack
|
||||||
|
paths:
|
||||||
|
- .stack
|
||||||
|
- .stack-work
|
||||||
|
|
||||||
stage: yesod:build
|
stage: yesod:build
|
||||||
script:
|
script:
|
||||||
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --no-strip --no-run-tests
|
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --no-strip --no-run-tests
|
||||||
@ -165,8 +184,11 @@ yesod:build:
|
|||||||
|
|
||||||
yesod:build:profile:
|
yesod:build:profile:
|
||||||
cache:
|
cache:
|
||||||
<<: *global_cache
|
- &stack-profile-cache
|
||||||
policy: pull
|
key: default-stack-profile
|
||||||
|
paths:
|
||||||
|
- .stack
|
||||||
|
- .stack-work
|
||||||
|
|
||||||
stage: yesod:build
|
stage: yesod:build
|
||||||
script:
|
script:
|
||||||
@ -195,7 +217,6 @@ yesod:build:profile:
|
|||||||
|
|
||||||
yesod:test:yesod:
|
yesod:test:yesod:
|
||||||
stage: test
|
stage: test
|
||||||
cache: {}
|
|
||||||
|
|
||||||
services: &test-services
|
services: &test-services
|
||||||
- name: postgres:10.10
|
- name: postgres:10.10
|
||||||
@ -224,7 +245,6 @@ yesod:test:yesod:
|
|||||||
|
|
||||||
yesod:test:yesod:dev:
|
yesod:test:yesod:dev:
|
||||||
stage: test
|
stage: test
|
||||||
cache: {}
|
|
||||||
|
|
||||||
services: *test-services
|
services: *test-services
|
||||||
|
|
||||||
@ -321,9 +341,6 @@ yesod:test:hlint:dev:
|
|||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
frontend:test:
|
frontend:test:
|
||||||
cache:
|
|
||||||
<<: *global_cache
|
|
||||||
policy: pull
|
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npm run frontend:test
|
- npm run frontend:test
|
||||||
@ -344,7 +361,6 @@ frontend:test:
|
|||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
parse-changelog:
|
parse-changelog:
|
||||||
cache: {}
|
|
||||||
stage: prepare release
|
stage: prepare release
|
||||||
needs:
|
needs:
|
||||||
- job: npm install
|
- job: npm install
|
||||||
@ -373,7 +389,6 @@ parse-changelog:
|
|||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
cache: {}
|
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
stage: upload packages
|
stage: upload packages
|
||||||
@ -411,7 +426,6 @@ upload:
|
|||||||
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/uniworx-wflint ${PACKAGE_REGISTRY_URL}/${VERSION}/uniworx-wflint
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/uniworx-wflint ${PACKAGE_REGISTRY_URL}/${VERSION}/uniworx-wflint
|
||||||
|
|
||||||
release:
|
release:
|
||||||
cache: {}
|
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
stage: release
|
stage: release
|
||||||
|
|||||||
Reference in New Issue
Block a user