2018-11-16 07:39:53 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2018-11-29 11:59:22 +01:00
|
|
|
set -e
|
|
|
|
|
2018-11-17 01:40:14 +01:00
|
|
|
# run setup script that gives us node, yarn, and bootstraps the project
|
2018-11-29 16:20:29 +01:00
|
|
|
source src/dev/ci_setup/setup.sh;
|
2018-11-17 01:40:14 +01:00
|
|
|
|
2018-11-26 19:33:33 +01:00
|
|
|
# download es snapshots
|
2018-11-17 01:40:14 +01:00
|
|
|
node scripts/es snapshot --download-only;
|
|
|
|
|
2018-11-26 19:33:33 +01:00
|
|
|
# download reporting browsers
|
|
|
|
cd "x-pack";
|
|
|
|
yarn gulp prepare;
|
|
|
|
cd -;
|
|
|
|
|
2019-03-05 21:03:07 +01:00
|
|
|
# cache the chromedriver bin
|
|
|
|
mkdir -p ".chromedriver/master"
|
|
|
|
chromedriverDistVersion="$(node -e "console.log(require('chromedriver').version)")"
|
|
|
|
chromedriverPkgVersion="$(node -e "console.log(require('./package.json').devDependencies.chromedriver)")"
|
|
|
|
if [ -z "$chromedriverDistVersion" ] || [ -z "$chromedriverPkgVersion" ]; then
|
|
|
|
echo "UNABLE TO DETERMINE CHROMEDRIVER VERSIONS"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
curl "https://chromedriver.storage.googleapis.com/$chromedriverDistVersion/chromedriver_linux64.zip" > .chromedriver/master/chromedriver.zip
|
|
|
|
echo "$chromedriverPkgVersion" > .chromedriver/master/pkgVersion
|
|
|
|
|
2018-11-17 01:40:14 +01:00
|
|
|
# archive cacheable directories
|
|
|
|
mkdir -p "$HOME/.kibana/bootstrap_cache"
|
|
|
|
tar -cf "$HOME/.kibana/bootstrap_cache/master.tar" \
|
|
|
|
node_modules \
|
|
|
|
packages/*/node_modules \
|
|
|
|
x-pack/node_modules \
|
|
|
|
x-pack/plugins/*/node_modules \
|
2018-11-26 19:33:33 +01:00
|
|
|
x-pack/plugins/reporting/.chromium \
|
2018-12-05 16:45:19 +01:00
|
|
|
test/plugin_functional/plugins/*/node_modules \
|
2019-03-05 21:03:07 +01:00
|
|
|
.es \
|
|
|
|
.chromedriver;
|