File tree 1 file changed +12
-19
lines changed
1 file changed +12
-19
lines changed Original file line number Diff line number Diff line change 10
10
- image : circleci/node:14.18.0
11
11
steps :
12
12
- checkout
13
- - attach_workspace :
14
- at : ~/repo
15
13
- run :
16
14
name : Install dependencies
17
15
command : yarn
@@ -38,24 +36,20 @@ jobs:
38
36
# docker create -v /repo --name repo alpine:3.4 /bin/true
39
37
# docker cp . repo:/repo
40
38
# docker run -it --volumes-from repo --workdir /repo/bus node:8.15.0 yarn test:integration
39
+ # Save workspace for subsequent jobs (i.e. test)
40
+ - persist_to_workspace :
41
+ root : .
42
+ paths :
43
+ - .
41
44
42
45
deploy :
43
46
<< : *defaults
44
47
docker :
45
48
- image : circleci/node:14.18.0
46
49
steps :
47
- - checkout
50
+ # Reuse the workspace from the build job
48
51
- attach_workspace :
49
- at : ~/repo
50
- - run :
51
- name : Install dependencies
52
- command : yarn
53
- - run :
54
- name : Bootstrap
55
- command : yarn run bootstrap
56
- - run :
57
- name : Build
58
- command : yarn run build
52
+ at : .
59
53
- run :
60
54
name : Authenticate with registry
61
55
command : echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
@@ -67,12 +61,11 @@ workflows:
67
61
version : 2
68
62
build-deploy :
69
63
jobs :
70
- - build :
71
- filters :
72
- branches :
73
- ignore :
74
- - master
64
+ - build
75
65
- deploy :
66
+ requires :
67
+ - build
76
68
filters :
77
69
branches :
78
- only : master
70
+ only :
71
+ - master
You can’t perform that action at this time.
0 commit comments