parent
062919d711
commit
bf21b412a3
2 changed files with 3 additions and 31 deletions
|
@ -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"
|
||||
|
||||
|
|
|
@ -129,25 +129,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
|
||||
|
|
Loading…
Reference in a new issue