node_cache: Run yarn install with --frozen-lockfile.

This way a yarn.lock inconsistent with package.json can’t slip through
unnoticed.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-05-20 15:56:51 -07:00
committed by Tim Abbott
parent 978357e55e
commit d267884cc1

View File

@@ -97,7 +97,7 @@ def do_yarn_install(target_path, yarn_args, success_stamp, stdout=None, stderr=N
cd_exec = os.path.join(ZULIP_PATH, "scripts/lib/cd_exec")
if os.environ.get('CUSTOM_CA_CERTIFICATES'):
cmds.append([YARN_BIN, "config", "set", "cafile", os.environ['CUSTOM_CA_CERTIFICATES']])
cmds.append([cd_exec, target_path, YARN_BIN, "install", "--non-interactive"] +
cmds.append([cd_exec, target_path, YARN_BIN, "install", "--non-interactive", "--frozen-lockfile"] +
yarn_args)
cmds.append(['touch', success_stamp])