[packerCache] fix gulp usage, don't archive node_modules (#83327)

Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
Spencer 2020-11-12 14:03:44 -07:00 committed by GitHub
parent 4c49d5d1be
commit 74e07d2390
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ node scripts/es snapshot --download-only;
node scripts/es snapshot --license=oss --download-only;
# download reporting browsers
(cd "x-pack" && yarn gulp downloadChromium);
(cd "x-pack" && node ../node_modules/.bin/gulp downloadChromium);
# cache the chromedriver archive
chromedriverDistVersion="$(node -e "console.log(require('chromedriver').version)")"
@ -51,10 +51,6 @@ tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \
.chromedriver \
.geckodriver;
echo "Adding node_modules"
# Find all of the node_modules directories that aren't test fixtures, and aren't inside other node_modules directories, and append them to the tar
find . -type d -name node_modules -not -path '*__fixtures__*' -prune -print0 | xargs -0I % tar -rf "$HOME/.kibana/bootstrap_cache/$branch.tar" "%"
echo "created $HOME/.kibana/bootstrap_cache/$branch.tar"
if [[ "$branch" != "master" ]]; then