77# To validate changes, use an online parser, eg.
88# http://yaml-online-parser.appspot.com/
99
10+ # Variables
11+
12+ # # IMPORTANT
13+ # If you change the `docker_image` version, also change the `cache_key` suffix and the version of
14+ # `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file.
15+ var_1 : &docker_image angular/ngcontainer:0.0.8
16+ var_2 : &cache_key angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.0.8
17+
1018# Settings common to each job
1119anchor_1 : &job_defaults
1220 working_directory : ~/ng
1321 docker :
14- # # IMPORTANT
15- # If you change this, also change the version of com_github_bazelbuild_buildtools
16- # in the /WORKSPACE file and the cache keys below
17- - image : angular/ngcontainer:0.0.8
18- # # IMPORTANT
22+ - image : *docker_image
1923
2024# After checkout, rebase on top of master.
2125# Similar to travis behavior, but not quite the same.
2226# See https://discuss.circleci.com/t/1662
2327anchor_2 : &post_checkout
24- post : git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST //*pull\//}/merge"
28+ post : git pull --ff-only origin "refs/pull/${CIRCLE_PULL_REQUEST //*pull\//}/merge"
2529
2630version : 2
2731jobs :
3640 (echo "BUILD files not formatted. Please run '' yarn buildifier'' " ; exit 1)'
3741
3842 - restore_cache :
39- key : angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.0.8
43+ key : *cache_key
4044
4145 - run : yarn install --frozen-lockfile --non-interactive
4246 - run : ./node_modules/.bin/gulp lint
@@ -47,13 +51,13 @@ jobs:
4751 - checkout :
4852 << : *post_checkout
4953 - restore_cache :
50- key : angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.0.8
54+ key : *cache_key
5155 - run : bazel info release
5256 - run : bazel run @yarn//:yarn
5357 - run : bazel build --config=ci packages/...
5458 - run : bazel test --config=ci packages/... @angular//...
5559 - save_cache :
56- key : angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.0.8
60+ key : *cache_key
5761 paths :
5862 - " node_modules"
5963
0 commit comments