diff --git a/.circleci/config.yml b/.circleci/config.yml index bfa50ff2db..c18a6b755f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,12 +11,14 @@ # needed for jobs that run tests without Bazel. Bazel runs tests with browsers that will be # fetched by the Webtesting rules. Therefore for jobs that run tests with Bazel, we don't need a # docker image with browsers pre-installed. -# **NOTE 1**: If you change the version of the `*-browsers` docker image, make sure the +# **NOTE 1**: Pin to exact images using an ID (SHA). See https://circleci.com/docs/2.0/circleci-images/#using-a-docker-image-id-to-pin-an-image-to-a-fixed-version. +# (Using the tag in not necessary when pinning by ID, but include it anyway for documentation purposes.) +# **NOTE 2**: If you change the version of the docker images, also change the `cache_key` suffix. +# **NOTE 3**: If you change the version of the `*-browsers` docker image, make sure the # `CI_CHROMEDRIVER_VERSION_ARG` env var (in `.circleci/env.sh`) points to a ChromeDriver # version that is compatible with the Chrome version in the image. -# **NOTE 2**: If you change the version of the docker images, also change the `cache_key` suffix. -var_1: &default_docker_image circleci/node:10.16 -var_2: &browsers_docker_image circleci/node:10.16-browsers +var_1: &default_docker_image circleci/node:10.16@sha256:75c05084fff4afa3683a03c5a04a4a3ad95c536ff2439d8fe14e7e1f5c58b09a +var_2: &browsers_docker_image circleci/node:10.16-browsers@sha256:d2a96fe1cbef51257ee626b5f645e64dade3e886f00ba9cb7e8ea65b4efe8db1 # We don't want to include the current branch name in the cache key because that would prevent # PRs from being able to restore the cache since the branch names are always different for PRs. # The cache key should only consist of dynamic values that change whenever something in the