diff --git a/x-pack/build_chromium/README.md b/x-pack/build_chromium/README.md index ad1fc484edfd80..501136ab0a965f 100644 --- a/x-pack/build_chromium/README.md +++ b/x-pack/build_chromium/README.md @@ -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!* diff --git a/x-pack/legacy/plugins/reporting/server/browsers/chromium/paths.ts b/x-pack/legacy/plugins/reporting/server/browsers/chromium/paths.ts index fee621d293c730..8e3ab55a71f353 100644 --- a/x-pack/legacy/plugins/reporting/server/browsers/chromium/paths.ts +++ b/x-pack/legacy/plugins/reporting/server/browsers/chromium/paths.ts @@ -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', }, ], diff --git a/x-pack/legacy/plugins/reporting/server/browsers/install.ts b/x-pack/legacy/plugins/reporting/server/browsers/install.ts index ed2fc3df459b8a..0f2ab28d2b75ec 100644 --- a/x-pack/legacy/plugins/reporting/server/browsers/install.ts +++ b/x-pack/legacy/plugins/reporting/server/browsers/install.ts @@ -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);