Navigation Menu

Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Commit

Permalink
chore: properly pass artifacts between jobs
Browse files Browse the repository at this point in the history
Stop misusing the cache for passing build artifacts. For our
runners we use per-host caches. So, one can't assume a cache
from a previous job to be available.
  • Loading branch information
pgerber committed Aug 4, 2021
1 parent 31b53c3 commit cde8c0c
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions .gitlab-ci.yml
Expand Up @@ -3,16 +3,6 @@ image: node:14.15.4-alpine
variables:
CYPRESS_INSTALL_BINARY: "0"

cache: &global_cache
key:
files:
- yarn.lock
- packages/*/yarn.lock
policy: pull
paths:
- node_modules/
- packages/*/node_modules/

stages:
- chore
- setup
Expand All @@ -24,18 +14,30 @@ stages:

yarn_setup:
stage: setup
needs: []
only:
- external_pull_requests
- master
cache:
<<: *global_cache
policy: pull-push
key:
files:
- yarn.lock
- packages/*/yarn.lock
paths:
- node_modules/
- packages/*/node_modules/
artifacts:
paths:
- node_modules/
- packages/*/node_modules/
script:
- yarn setup:ci
interruptible: true

linting:
stage: quality
dependencies:
- yarn_setup
only:
- external_pull_requests
- master
Expand All @@ -44,6 +46,8 @@ linting:

test:
stage: quality
dependencies:
- yarn_setup
only:
- external_pull_requests
- master
Expand All @@ -55,6 +59,7 @@ test:

storybook:
stage: quality
dependencies: []
only:
- external_pull_requests
- master
Expand All @@ -66,6 +71,9 @@ storybook:

storybook-link:
stage: pullrequest
dependencies: []
needs:
- storybook
cache: {}
before_script:
- apk update && apk add bash && apk add curl && apk add jq
Expand All @@ -76,6 +84,7 @@ storybook-link:

cherrypick:
stage: release
dependencies: []
only:
- /^nice-releases\/[0-9]+$/
before_script:
Expand All @@ -87,6 +96,8 @@ cherrypick:

cypress:
stage: onschedule
dependencies:
- yarn_setup
image: cypress/base:10
variables:
CYPRESS_INSTALL_BINARY: "6.4.0"
Expand Down

0 comments on commit cde8c0c

Please sign in to comment.