Prevent puppeteer from downloading Chromium

Authored by hashar on Dec 15 2017, 7:31 PM.

Description

Prevent puppeteer from downloading Chromium

In production we would use the Chromium package has provided by Debian
and hence there is no need to download a bundled chromium. On CI
Chromium is provided as well.

Ask puppeteer to skip download. That can be achieved either by setting
the environment variable PUPPETEER_SKIP_CHROMIUM_DOWNLOAD or via a
.nmprc local to the repository. The later seems more robust but would
require developers to have the system version installed so this must be
manually set in production and CI. This option requires providing a
Chromium executable path in the YAML Puppeteer config.

Result:

$ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 npm install puppeteer@^0.13.0

> puppeteer@0.13.0 install
mediawiki/services/chromium-render/node_modules/puppeteer
> node install.js

**INFO** Skipping Chromium download.
"PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" was set in npm config.

The /deploy repository needs a similar adjustement.

Bug: T179552
Change-Id: Ibf6b99d8bf6637cbb926cee13b594589c3dedaca

Details

Committed
NiedzielskiTue, Feb 13, 4:23 PM
Parents
rMSCR6650cf89833d: Doc: revise readme
Branches
Unknown
Tags
Unknown
References
refs/changes/27/398527/7
ChangeId
Ibf6b99d8bf6637cbb926cee13b594589c3dedaca