kibana/test/scripts/jenkins_xpack_ci_group.sh
Tyler Smalley ef1e5b4288 [ci] Use trap to generate report for non-PR build (#26829)
Since this is no longer part of a reporting task in Jenkins, we no
longer need to re-run kbn bootstrap when generating a report.

We use the PR_SOURCE_BRANCH environment variable to prevent genererating
Github issues when we are on a PR.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-01-08 17:13:12 -06:00

45 lines
1.2 KiB
Bash
Executable file

#!/usr/bin/env bash
set -e
function report {
if [[ -z "$PR_SOURCE_BRANCH" ]]; then
cd "$KIBANA_DIR"
node src/dev/failed_tests/cli
else
echo "Failure issues not created on pull requests"
fi
}
trap report EXIT
source src/dev/ci_setup/checkout_sibling_es.sh
export TEST_BROWSER_HEADLESS=1
echo " -> Ensuring all functional tests are in a ciGroup"
cd "$XPACK_DIR"
node scripts/functional_tests --assert-none-excluded \
--include-tag ciGroup1 \
--include-tag ciGroup2 \
--include-tag ciGroup3 \
--include-tag ciGroup4 \
--include-tag ciGroup5 \
--include-tag ciGroup6 \
--include-tag ciGroup7
echo " -> building and extracting default Kibana distributable for use in functional tests"
cd "$KIBANA_DIR"
node scripts/build --debug --no-oss
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
installDir="$PARENT_DIR/install/kibana"
mkdir -p "$installDir"
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
export TEST_ES_FROM=${TEST_ES_FROM:-source}
echo " -> Running functional and api tests"
cd "$XPACK_DIR"
node scripts/functional_tests --debug --bail --kibana-install-dir "$installDir" --include-tag "ciGroup$CI_GROUP"
echo ""
echo ""