@@ -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,39 +140,33 @@ 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
- resource_class : xlarge
153
149
steps :
154
150
- *checkout_code
155
151
- *restore_cache
156
152
- *yarn_install
153
+ - *attach_release_output
157
154
158
155
- run : yarn gulp ci:aot
159
156
160
- - *save_cache
161
-
162
157
# -------------------------------------------------------------------------
163
158
# Job that pre-render's the universal app with `@angular/platform-server`.
164
159
# This verifies that Angular Material can be rendered within Node.
165
160
# -------------------------------------------------------------------------
166
161
prerender_build :
167
162
<< : *job_defaults
168
- resource_class : xlarge
169
163
steps :
170
164
- *checkout_code
171
165
- *restore_cache
172
166
- *yarn_install
173
167
174
168
- run : yarn gulp ci:prerender
175
169
176
- - *save_cache
177
-
178
170
# ----------------------------------
179
171
# Lint job. Runs the gulp lint task.
180
172
# ----------------------------------
@@ -187,6 +179,27 @@ jobs:
187
179
188
180
- run : yarn gulp ci:lint
189
181
182
+ # -------------------------------------------------------------------------------------------
183
+ # Job that builds all release packages with Gulp. The built packages can be then used in the
184
+ # same workflow to publish snapshot builds or test the demo-app with the release packages.
185
+ # -------------------------------------------------------------------------------------------
186
+ build_release_packages :
187
+ << : *job_defaults
188
+ resource_class : xlarge
189
+ steps :
190
+ - *checkout_code
191
+ - *restore_cache
192
+ - *yarn_install
193
+
194
+ - run : yarn gulp ci:build-release-packages
195
+
196
+ # Store the release output in the workspace storage. This means that other jobs
197
+ # in the same workflow can attach the release output to their job.
198
+ - persist_to_workspace :
199
+ root : dist/releases
200
+ paths :
201
+ - " **/*"
202
+
190
203
- *save_cache
191
204
192
205
# ----------------------------------------------------------------------------------------
@@ -214,7 +227,13 @@ workflows:
214
227
jobs :
215
228
- e2e_tests
216
229
- prerender_build
217
- - demo_app_aot
230
+
231
+ release_output :
232
+ jobs :
233
+ - build_release_packages
234
+ - build_demoapp_aot :
235
+ requires :
236
+ - build_release_packages
218
237
219
238
# Lint workflow. As we want to lint in one job, this is a workflow with just one job.
220
239
lint :
0 commit comments