Fix rawChecksums in chromium build and rename for clarity (#44665)

* Fix rawChecksums in chromium build and rename for clarity

* Update rawChecksum => binaryChecksum in chromium build docs

* Move over to Google Storage vs AWS

* Revert "Move over to Google Storage vs AWS"

This reverts commit 4781f9bdff.
This commit is contained in:
Joel Griffith 2019-09-03 12:49:07 -07:00 committed by GitHub
parent 9a07a91e38
commit ebbfb4f680
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -110,10 +110,10 @@ To run the build, replace the sha in the following commands with the sha that yo
After the build completes, there will be a .zip file and a .md5 file in `~/chromium/chromium/src/out/headless`. These are named like so: `chromium-{first_7_of_SHA}-{platform}`, for example: `chromium-4747cc2-linux`.
The zip files need to be deployed to s3. For testing, I drop them into `headless-shell-dev`, but for production, they need to be in `headless-shell`. And the `x-pack/legacy/plugins/reporting/server/browsers/chromium/paths.js` file needs to be upated to have the correct `archiveChecksum`, `archiveFilename`, `rawChecksum` and `baseUrl`. Below is a list of what the archive's are:
The zip files need to be deployed to s3. For testing, I drop them into `headless-shell-dev`, but for production, they need to be in `headless-shell`. And the `x-pack/legacy/plugins/reporting/server/browsers/chromium/paths.js` file needs to be upated to have the correct `archiveChecksum`, `archiveFilename`, `binaryChecksum` and `baseUrl`. Below is a list of what the archive's are:
- `archiveChecksum`: The contents of the `.md5` file, which is the `md5` checksum of the zip file.
- `rawChecksum`: The `md5` checksum of the `headless_shell` binary itself.
- `binaryChecksum`: The `md5` checksum of the `headless_shell` binary itself.
*If you're building in the cloud, don't forget to turn off your VM after retrieving the build artifacts!*

View file

@ -14,21 +14,21 @@ export const paths = {
platforms: ['darwin', 'freebsd', 'openbsd'],
archiveFilename: 'chromium-312d84c-darwin.zip',
archiveChecksum: '020303e829745fd332ae9b39442ce570',
rawChecksum: '101dfea297c5818a7a3f3317a99dde02',
binaryChecksum: '5cdec11d45a0eddf782bed9b9f10319f',
binaryRelativePath: 'headless_shell-darwin/headless_shell',
},
{
platforms: ['linux'],
archiveFilename: 'chromium-312d84c-linux.zip',
archiveChecksum: '15ba9166a42f93ee92e42217b737018d',
rawChecksum: '3455db62ea4bd2d6e891e9155313305a',
binaryChecksum: 'c7fe36ed3e86a6dd23323be0a4e8c0fd',
binaryRelativePath: 'headless_shell-linux/headless_shell',
},
{
platforms: ['win32'],
archiveFilename: 'chromium-312d84c-windows.zip',
archiveChecksum: '3e36adfb755dacacc226ed5fd6b43105',
rawChecksum: 'ec7aa6cfecb172129474b447311275ec',
binaryChecksum: '9913e431fbfc7dfcd958db74ace4d58b',
binaryRelativePath: 'headless_shell-windows\\headless_shell.exe',
},
],

View file

@ -38,9 +38,9 @@ export async function installBrowser(
}
const binaryPath = path.join(installsPath, pkg.binaryRelativePath);
const rawChecksum = await md5(binaryPath).catch(() => '');
const binaryChecksum = await md5(binaryPath).catch(() => '');
if (rawChecksum !== pkg.rawChecksum) {
if (binaryChecksum !== pkg.binaryChecksum) {
const archive = path.join(browser.paths.archivesPath, pkg.archiveFilename);
logger.debug(`Extracting [${archive}] to [${binaryPath}]`);
await extract(archive, installsPath);