2019-06-14 20:16:48 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-09-13 22:43:48 +02:00
|
|
|
if [[ -z "$IS_PIPELINE_JOB" ]] ; then
|
|
|
|
trap 'node "$KIBANA_DIR/src/dev/failed_tests/cli"' EXIT
|
|
|
|
else
|
2019-09-11 20:58:28 +02:00
|
|
|
source src/dev/ci_setup/setup_env.sh
|
|
|
|
fi
|
|
|
|
|
2019-06-16 16:23:36 +02:00
|
|
|
source "$KIBANA_DIR/src/dev/ci_setup/setup_percy.sh"
|
|
|
|
|
2019-09-11 20:58:28 +02:00
|
|
|
if [[ -z "$IS_PIPELINE_JOB" ]] ; then
|
|
|
|
node scripts/build --debug --oss;
|
|
|
|
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-oss-*-linux-x86_64.tar.gz')"
|
|
|
|
installDir="$PARENT_DIR/install/kibana"
|
|
|
|
mkdir -p "$installDir"
|
|
|
|
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
|
|
|
|
else
|
|
|
|
installDir="$(realpath $PARENT_DIR/kibana/build/oss/kibana-*-SNAPSHOT-linux-x86_64)"
|
|
|
|
destDir=${installDir}-${CI_WORKER_NUMBER}
|
|
|
|
cp -R "$installDir" "$destDir"
|
|
|
|
|
|
|
|
export KIBANA_INSTALL_DIR="$destDir"
|
|
|
|
fi
|
2019-06-14 20:16:48 +02:00
|
|
|
|
|
|
|
export TEST_BROWSER_HEADLESS=1
|
|
|
|
|
|
|
|
checks-reporter-with-killswitch "Kibana visual regression tests" \
|
|
|
|
yarn run percy exec \
|
|
|
|
node scripts/functional_tests \
|
|
|
|
--debug --bail \
|
|
|
|
--kibana-install-dir "$installDir" \
|
|
|
|
--config test/visual_regression/config.ts;
|