diff --git a/.ci/packer_cache.sh b/.ci/packer_cache.sh index b697f22c009d1..3dc2b1da658cb 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/legacy/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 1af2f2748f1f3..b1b14095a8bc2 100755 --- a/src/dev/ci_setup/setup.sh +++ b/src/dev/ci_setup/setup.sh @@ -132,25 +132,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