Commit 6dc1ba2a authored by Christopher Mark Fullarton's avatar Christopher Mark Fullarton
Browse files

Opens the chrome browser in the ci job

parent 94171b21
...@@ -63,6 +63,7 @@ generate_previews: ...@@ -63,6 +63,7 @@ generate_previews:
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list - echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
- apt-get -y update - apt-get -y update
- apt-get -y install google-chrome-stable - apt-get -y install google-chrome-stable
- google-chrome --headless --hide-scrollbars --remote-debugging-port=9222 --disable-gpu --user-data-dir=remote-profile &
- export CHROME_BIN=`whereis google-chrome | cut -d " " -f 2` - export CHROME_BIN=`whereis google-chrome | cut -d " " -f 2`
- npm install - npm install
- cd dist - cd dist
......
...@@ -98,7 +98,7 @@ class GenerateImages { ...@@ -98,7 +98,7 @@ class GenerateImages {
}); });
console.log('chrome stuff', CHROME_BIN, themePreviewEndpoint, params, path.join('ChromeDriver.js'), `--urls=${JSON.stringify(params)}`); console.log('chrome stuff', CHROME_BIN, themePreviewEndpoint, params, path.join('ChromeDriver.js'), `--urls=${JSON.stringify(params)}`);
const chromeInstance = child_process.spawnSync(CHROME_BIN, flags); // const chromeInstance = child_process.spawnSync(CHROME_BIN, flags);
const chromeDriver = child_process.spawn(`node`, [ const chromeDriver = child_process.spawn(`node`, [
path.join('ChromeDriver.js'), `--urls=${JSON.stringify(params)}` path.join('ChromeDriver.js'), `--urls=${JSON.stringify(params)}`
]); ]);
...@@ -111,7 +111,7 @@ class GenerateImages { ...@@ -111,7 +111,7 @@ class GenerateImages {
}); });
chromeDriver.on('exit', () => { chromeDriver.on('exit', () => {
console.log(`ChromeDriver (exit): All preview images have been generated`); console.log(`ChromeDriver (exit): All preview images have been generated`);
chromeInstance.kill(); // chromeInstance.kill();
}); });
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment