From 25f77f4ae0d4b27eaff677ca358a1cf142c58dfb Mon Sep 17 00:00:00 2001 From: Spencer Date: Fri, 19 Jul 2019 00:08:22 -0700 Subject: [PATCH] [7.2] Use custom GECKODRIVER_CDNURL (#41513) (#41550) --- .ci/packer_cache.sh | 13 +------------ src/dev/ci_setup/setup.sh | 21 ++------------------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/.ci/packer_cache.sh b/.ci/packer_cache.sh index 4b8d4fff8c4b5..e449f182263d4 100755 --- a/.ci/packer_cache.sh +++ b/.ci/packer_cache.sh @@ -25,16 +25,6 @@ mkdir -p .chromedriver curl "https://chromedriver.storage.googleapis.com/$chromedriverDistVersion/chromedriver_linux64.zip" > .chromedriver/chromedriver.zip echo "$chromedriverPkgVersion" > .chromedriver/pkgVersion -# cache the geckodriver archive -geckodriverPkgVersion="$(node -e "console.log(require('./package.json').devDependencies.geckodriver)")" -if [ -z "$geckodriverPkgVersion" ]; then - echo "UNABLE TO DETERMINE geckodriver VERSIONS" - exit 1 -fi -mkdir -p ".geckodriver" -cp "node_modules/geckodriver/geckodriver.tar.gz" .geckodriver/geckodriver.tar.gz -echo "$geckodriverPkgVersion" > .geckodriver/pkgVersion - # archive cacheable directories mkdir -p "$HOME/.kibana/bootstrap_cache" tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \ @@ -45,8 +35,7 @@ tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \ x-pack/plugins/reporting/.chromium \ test/plugin_functional/plugins/*/node_modules \ .es \ - .chromedriver \ - .geckodriver; + .chromedriver; echo "created $HOME/.kibana/bootstrap_cache/$branch.tar" diff --git a/src/dev/ci_setup/setup.sh b/src/dev/ci_setup/setup.sh index 3c17ca0abe7cf..5c39d85c035a4 100755 --- a/src/dev/ci_setup/setup.sh +++ b/src/dev/ci_setup/setup.sh @@ -134,25 +134,8 @@ else echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" fi -### -### use the geckodriver cache if it exists -### -if [ -d "$dir/.geckodriver" ]; then - branchPkgVersion="$(node -e "console.log(require('./package.json').devDependencies.geckodriver)")" - cachedPkgVersion="$(cat "$dir/.geckodriver/pkgVersion")" - if [ "$cachedPkgVersion" == "$branchPkgVersion" ]; then - export GECKODRIVER_FILEPATH="$dir/.geckodriver/geckodriver.tar.gz" - echo " -- Using geckodriver cache at '$GECKODRIVER_FILEPATH'" - else - echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - echo " SKIPPING GECKODRIVER CACHE: cached($cachedPkgVersion) branch($branchPkgVersion)" - echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - fi -else - echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - echo " GECKODRIVER CACHE NOT FOUND" - echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" -fi +# use a proxy to fetch geckodriver asset +export GECKODRIVER_CDNURL="https://us-central1-elastic-kibana-184716.cloudfunctions.net/geckodriver_cache" ### ### install dependencies