Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: pin ChromeDriver version #20940

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion aio/package.json
Expand Up @@ -56,7 +56,7 @@
"~~check-env": "node scripts/check-environment",
"~~build": "ng build --target=production --environment=stable -sm",
"post~~build": "yarn sw-manifest && yarn sw-copy",
"~~update-webdriver": "webdriver-manager update --standalone false --gecko false"
"~~update-webdriver": "webdriver-manager update --standalone false --gecko false $CHROMEDRIVER_VERSION_ARG"
},
"engines": {
"node": ">=8.9.1 <9.0.0",
Expand Down
6 changes: 4 additions & 2 deletions aio/tools/examples/run-example-e2e.js
Expand Up @@ -200,8 +200,10 @@ function runProtractorAoT(appDir, outputFile) {
// All protractor output is appended to the outputFile.
// CLI version
function runE2eTestsCLI(appDir, outputFile) {
// --preserve-symlinks is needed due the symlinked node_modules in each example
const e2eSpawn = spawnExt('yarn', ['e2e', '--preserve-symlinks'], { cwd: appDir });
// `--preserve-symlinks` is needed due the symlinked `node_modules/` in each example.
// `--no-webdriver-update` is needed to preserve the ChromeDriver version already installed.
const args = ['e2e', '--preserve-symlinks', '--no-webdriver-update'];
const e2eSpawn = spawnExt('yarn', args, { cwd: appDir });
return e2eSpawn.promise.then(
function () {
fs.appendFileSync(outputFile, `Passed: ${appDir}\n\n`);
Expand Down
2 changes: 1 addition & 1 deletion aio/tools/examples/shared/package.json
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"http-server": "http-server",
"protractor": "protractor",
"webdriver:update": "webdriver-manager update --standalone false --gecko false",
"webdriver:update": "webdriver-manager update --standalone false --gecko false $CHROMEDRIVER_VERSION_ARG",
"postinstall": "yarn webdriver:update"
},
"keywords": [],
Expand Down
2 changes: 1 addition & 1 deletion integration/dynamic-compiler/package.json
Expand Up @@ -10,7 +10,7 @@
"ngc": "ngc -p tsconfig.json",
"rollup": "rollup -f iife -c rollup.config.js -o dist/bundle.es2015.js",
"rollup:lazy": "rollup -f cjs -c rollup.lazy.config.js -o dist/lazy.bundle.es2015.js",
"postinstall": "webdriver-manager update --gecko false",
"postinstall": "webdriver-manager update --gecko false --standalone false $CHROMEDRIVER_VERSION_ARG",
"preprotractor": "tsc -p e2e",
"protractor": "protractor e2e/protractor.config.js",
"serve": "lite-server -c e2e/browser.config.json",
Expand Down
2 changes: 1 addition & 1 deletion integration/hello_world__closure/package.json
Expand Up @@ -22,7 +22,7 @@
"protractor": "file:../../node_modules/protractor"
},
"scripts": {
"postinstall": "webdriver-manager update --gecko false",
"postinstall": "webdriver-manager update --gecko false --standalone false $CHROMEDRIVER_VERSION_ARG",
"closure": "java -jar node_modules/google-closure-compiler/compiler.jar --flagfile closure.conf",
"test": "ngc && yarn run closure && concurrently \"yarn run serve\" \"yarn run protractor\" --kill-others --success first",
"serve": "lite-server -c e2e/browser.config.json",
Expand Down
2 changes: 1 addition & 1 deletion integration/hello_world__systemjs_umd/package.json
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.0",
"license": "MIT",
"scripts": {
"postinstall": "webdriver-manager update --gecko false",
"postinstall": "webdriver-manager update --gecko false --standalone false $CHROMEDRIVER_VERSION_ARG",
"test": "concurrently \"npm run serve\" \"npm run protractor\" --kill-others --success first",
"serve": "lite-server -c bs-config.e2e.json",
"preprotractor": "tsc -p e2e",
Expand Down
2 changes: 1 addition & 1 deletion integration/i18n/package.json
Expand Up @@ -22,7 +22,7 @@
"protractor": "file:../../node_modules/protractor"
},
"scripts": {
"postinstall": "webdriver-manager update --gecko false",
"postinstall": "webdriver-manager update --gecko false --standalone false $CHROMEDRIVER_VERSION_ARG",
"closure": "java -jar node_modules/google-closure-compiler/compiler.jar --flagfile closure.conf",
"test": "ngc && yarn run closure && concurrently \"yarn run serve\" \"yarn run protractor\" --kill-others --success first",
"serve": "lite-server -c e2e/browser.config.json",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -17,7 +17,8 @@
},
"scripts": {
"preinstall": "node -e \"if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/')\"",
"postinstall": "webdriver-manager update --gecko false",
"postinstall": "yarn update-webdriver",
"update-webdriver": "webdriver-manager update --gecko false $CHROMEDRIVER_VERSION_ARG",
"check-env": "gulp check-env"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-server/integrationtest/package.json
Expand Up @@ -33,7 +33,7 @@
"webpack": "^2.2.1"
},
"scripts": {
"postinstall": "webdriver-manager update --gecko false",
"postinstall": "webdriver-manager update --gecko false --standalone false $CHROMEDRIVER_VERSION_ARG",
"build": "./build.sh",
"test": "npm run build && concurrently \"npm run serve\" \"npm run protractor\" --kill-others --success first",
"serve": "node built/server-bundle.js",
Expand Down
3 changes: 2 additions & 1 deletion scripts/ci/env.sh
Expand Up @@ -17,7 +17,7 @@ function setEnvVar() {
if [[ ${print} == "print" ]]; then
echo ${name}=${value}
fi
export ${name}=${value}
export ${name}="${value}"
}

# use BASH_SOURCE so that we get the right path when this script is called AND source-d
Expand All @@ -37,6 +37,7 @@ fi
setEnvVar NODE_VERSION 8.9.1
setEnvVar YARN_VERSION 1.0.2
setEnvVar CHROMIUM_VERSION 499098 # Chrome 62 linux stable, see https://www.chromium.org/developers/calendar
setEnvVar CHROMEDRIVER_VERSION_ARG "--versions.chrome 2.33"
setEnvVar BAZEL_VERSION 0.8.1
setEnvVar SAUCE_CONNECT_VERSION 4.4.9
setEnvVar ANGULAR_CLI_VERSION 1.5.0-rc.2
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/install.sh
Expand Up @@ -37,7 +37,7 @@ travisFoldEnd "install-yarn"

# Install all npm dependencies according to yarn.lock
travisFoldStart "yarn-install"
node tools/npm/check-node-modules --purge || yarn install --frozen-lockfile --non-interactive
(node tools/npm/check-node-modules --purge && yarn update-webdriver) || yarn install --frozen-lockfile --non-interactive
travisFoldEnd "yarn-install"


Expand Down