|
7 | 7 | # To validate changes, use an online parser, eg.
|
8 | 8 | # http://yaml-online-parser.appspot.com/
|
9 | 9 |
|
10 |
| -var_1: &docker_image circleci/node:10.16 |
| 10 | +var_1: &docker_image circleci/node:12.9.1 |
| 11 | +var_2: &docker-firefox-image |
| 12 | + # TODO(devversion): Temporarily use a image that includes Firefox 62 because the |
| 13 | + # ngcontainer image does include an old Firefox version that does not support headless. |
| 14 | + - image: circleci/node:12.9.1-browsers |
11 | 15 |
|
12 | 16 | # **Note**: When updating the beginning of the cache key, also update the cache key to match
|
13 | 17 | # the new cache key prefix. This allows us to take advantage of CircleCI's fallback caching.
|
14 | 18 | # Read more here: https://circleci.com/docs/2.0/caching/#restoring-cache.
|
15 |
| -var_2: &cache_key v4-ng-mat-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }} |
16 |
| -var_3: &cache_fallback_key v4-ng-mat- |
| 19 | +var_3: &cache_key v4-ng-mat-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }} |
| 20 | +var_4: &cache_fallback_key v4-ng-mat- |
17 | 21 |
|
18 | 22 | # Settings common to each job
|
19 |
| -var_4: &job_defaults |
| 23 | +var_5: &job_defaults |
20 | 24 | working_directory: ~/ng
|
21 | 25 | docker:
|
22 | 26 | - image: *docker_image
|
23 | 27 |
|
24 | 28 | # Job step for checking out the source code from GitHub. This also ensures that the source code
|
25 | 29 | # is rebased on top of master.
|
26 |
| -var_5: &checkout_code |
| 30 | +var_6: &checkout_code |
27 | 31 | checkout:
|
28 | 32 | # After checkout, rebase on top of master. By default, PRs are not rebased on top of master,
|
29 | 33 | # which we want. See https://discuss.circleci.com/t/1662
|
30 | 34 | post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"
|
31 | 35 |
|
32 | 36 | # Restores the cache that could be available for the current Yarn lock file. The cache usually
|
33 | 37 | # includes the node modules and the Bazel repository cache.
|
34 |
| -var_6: &restore_cache |
| 38 | +var_7: &restore_cache |
35 | 39 | restore_cache:
|
36 | 40 | keys:
|
37 | 41 | - *cache_key
|
38 | 42 | - *cache_fallback_key
|
39 | 43 |
|
40 | 44 | # Saves the cache for the current Yarn lock file. We store the node modules and the Bazel
|
41 | 45 | # repository cache in order to make subsequent builds faster.
|
42 |
| -var_7: &save_cache |
| 46 | +var_8: &save_cache |
43 | 47 | save_cache:
|
44 | 48 | key: *cache_key
|
45 | 49 | paths:
|
46 | 50 | - "node_modules"
|
47 | 51 | - "~/bazel_repository_cache"
|
48 | 52 |
|
49 | 53 | # Decryption token that is used to decode the GCP credentials file in ".circleci/gcp_token".
|
50 |
| -var_8: &gcp_decrypt_token "angular" |
| 54 | +var_9: &gcp_decrypt_token "angular" |
51 | 55 |
|
52 | 56 | # Job step that ensures that the node module dependencies are installed and up-to-date. We use
|
53 | 57 | # Yarn with the frozen lockfile option in order to make sure that lock file and package.json are
|
54 | 58 | # in sync. Unlike in Travis, we don't need to manually purge the node modules if stale because
|
55 | 59 | # CircleCI automatically discards the cache if the checksum of the lock file has changed.
|
56 |
| -var_9: &yarn_install |
| 60 | +var_10: &yarn_install |
57 | 61 | run:
|
58 | 62 | name: "Installing project dependencies"
|
59 | 63 | command: yarn install --frozen-lockfile --non-interactive
|
60 | 64 |
|
61 | 65 | # Anchor that can be used to download and install Yarn globally in the bash environment.
|
62 |
| -var_10: &yarn_download |
| 66 | +var_11: &yarn_download |
63 | 67 | run:
|
64 | 68 | name: "Downloading and installing Yarn"
|
65 | 69 | command: |
|
66 | 70 | touch $BASH_ENV
|
67 | 71 | curl -o- -L https://yarnpkg.com/install.sh | PROFILE=$BASH_ENV bash -s -- --version "1.17.3"
|
68 | 72 | # Sets up the Bazel config which is specific for CircleCI builds.
|
69 |
| -var_11: &setup_bazel_ci_config |
| 73 | +var_12: &setup_bazel_ci_config |
70 | 74 | run:
|
71 | 75 | name: "Setting up Bazel configuration for CI"
|
72 | 76 | command: |
|
73 | 77 | echo "import %workspace%/.circleci/bazel.rc" >> ./.bazelrc
|
74 |
| -# Sets up a different Docker image that includes a moe recent Firefox version which |
75 |
| -# is needed for headless testing. |
76 |
| -var_12: &docker-firefox-image |
77 |
| - # TODO(devversion): Temporarily use a image that includes Firefox 62 because the |
78 |
| - # ngcontainer image does include an old Firefox version that does not support headless. |
79 |
| - - image: circleci/node:11.4.0-browsers |
80 | 78 |
|
81 | 79 | # Attaches the release output which has been stored in the workspace to the current job.
|
82 | 80 | # https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
|
|
0 commit comments