@@ -60,6 +60,12 @@ var_9: &docker-firefox-image
60
60
# See the PR that fixes this: https://github.com/angular/angular/pull/26435
61
61
- image : circleci/node:10.12-browsers
62
62
63
+ # Attaches the release output which has been stored in the workspace to the current job.
64
+ # https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
65
+ var_10 : &attach_release_output
66
+ attach_workspace :
67
+ at : dist/releases
68
+
63
69
# -----------------------------
64
70
# Container version of CircleCI
65
71
# -----------------------------
86
92
- run : bazel build src/cdk/... src/lib/...
87
93
- run : bazel test src/cdk/... src/lib/...
88
94
89
- - *save_cache
90
-
91
95
# ------------------------------------------------------------------------------------------
92
96
# Job that runs the unit tests on locally installed browsers (Chrome and Firefox headless).
93
97
# The available browsers are installed through the angular/ngcontainer Docker image.
@@ -106,15 +110,11 @@ jobs:
106
110
# variable which has been configured above
107
111
- run : yarn gulp ci:test
108
112
109
- - *save_cache
110
-
111
113
# ----------------------------------------------------------------
112
- # Job that runs the e2e tests with Protractor and Chrome w/ Xvfb. We cannot use
113
- # Chrome headless because our tests rely on APIs which are not testable in headless mode.
114
- # For example: the Fullscreen browser API.
114
+ # Job that runs the e2e tests with Protractor and Chrome Headless
115
115
# ----------------------------------------------------------------
116
116
e2e_tests :
117
- docker : *docker-firefox-image
117
+ << : *job_defaults
118
118
resource_class : xlarge
119
119
steps :
120
120
- *checkout_code
@@ -123,8 +123,6 @@ jobs:
123
123
124
124
- run : yarn gulp ci:e2e
125
125
126
- - *save_cache
127
-
128
126
# ----------------------------------------------------------------------------
129
127
# Job that runs the unit tests on Browserstack. The browsers that will be used
130
128
# to run the unit tests on Browserstack are set in: test/browser-providers.js
@@ -142,23 +140,21 @@ jobs:
142
140
143
141
- run : ./scripts/circleci/run-browserstack-tests.sh
144
142
145
- - *save_cache
146
-
147
- # --------------------------------------
148
- # Job that builds the demo-app with AOT
149
- # --------------------------------------
150
- demo_app_aot :
143
+ # -----------------------------------------------------------------------------------------
144
+ # Job that builds the demo-app with AOT. In order to speed up this job, the release output
145
+ # from the workspace storage will be attached to this job.
146
+ # -----------------------------------------------------------------------------------------
147
+ build_demoapp_aot :
151
148
<< : *job_defaults
152
149
resource_class : xlarge
153
150
steps :
154
151
- *checkout_code
155
152
- *restore_cache
156
153
- *yarn_install
154
+ - *attach_release_output
157
155
158
156
- run : yarn gulp ci:aot
159
157
160
- - *save_cache
161
-
162
158
# -------------------------------------------------------------------------
163
159
# Job that pre-render's the universal app with `@angular/platform-server`.
164
160
# This verifies that Angular Material can be rendered within Node.
@@ -173,8 +169,6 @@ jobs:
173
169
174
170
- run : yarn gulp ci:prerender
175
171
176
- - *save_cache
177
-
178
172
# ----------------------------------
179
173
# Lint job. Runs the gulp lint task.
180
174
# ----------------------------------
@@ -187,6 +181,26 @@ jobs:
187
181
188
182
- run : yarn gulp ci:lint
189
183
184
+ # -------------------------------------------------------------------------------------------
185
+ # Job that builds all release packages with Gulp. The built packages can be then used in the
186
+ # same workflow to publish snapshot builds or test the demo-app with the release packages.
187
+ # -------------------------------------------------------------------------------------------
188
+ build_release_packages :
189
+ << : *job_defaults
190
+ steps :
191
+ - *checkout_code
192
+ - *restore_cache
193
+ - *yarn_install
194
+
195
+ - run : yarn gulp ci:build-release-packages
196
+
197
+ # Store the release output in the workspace storage. This means that other jobs
198
+ # in the same workflow can attach the release output to their job.
199
+ - persist_to_workspace :
200
+ root : dist/releases
201
+ paths :
202
+ - " **/*"
203
+
190
204
- *save_cache
191
205
192
206
# ----------------------------------------------------------------------------------------
@@ -214,7 +228,13 @@ workflows:
214
228
jobs :
215
229
- e2e_tests
216
230
- prerender_build
217
- - demo_app_aot
231
+
232
+ release_output :
233
+ jobs :
234
+ - build_release_packages
235
+ - build_demoapp_aot :
236
+ requires :
237
+ - build_release_packages
218
238
219
239
# Lint workflow. As we want to lint in one job, this is a workflow with just one job.
220
240
lint :
0 commit comments