2019-09-11 20:58:28 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-06-21 09:28:12 +02:00
|
|
|
cd "$KIBANA_DIR"
|
2019-09-11 20:58:28 +02:00
|
|
|
source src/dev/ci_setup/setup_env.sh
|
2019-09-15 17:12:47 +02:00
|
|
|
|
2020-08-14 22:41:47 +02:00
|
|
|
if [[ ! "$TASK_QUEUE_PROCESS_ID" ]]; then
|
|
|
|
./test/scripts/jenkins_build_plugins.sh
|
|
|
|
fi
|
2020-02-14 19:35:24 +01:00
|
|
|
|
|
|
|
# doesn't persist, also set in kibanaPipeline.groovy
|
|
|
|
export KBN_NP_PLUGINS_BUILT=true
|
|
|
|
|
2019-09-15 17:12:47 +02:00
|
|
|
echo " -> Ensuring all functional tests are in a ciGroup"
|
2021-08-23 21:07:12 +02:00
|
|
|
node scripts/ensure_all_tests_in_ci_group
|
2021-06-21 09:28:12 +02:00
|
|
|
|
|
|
|
echo " -> building and extracting default Kibana distributable for use in functional tests"
|
2021-06-30 03:50:33 +02:00
|
|
|
node scripts/build --debug
|
2020-08-14 22:41:47 +02:00
|
|
|
|
2021-02-09 00:40:11 +01:00
|
|
|
echo " -> shipping metrics from build to ci-stats"
|
2021-02-16 22:01:26 +01:00
|
|
|
node scripts/ship_ci_stats \
|
|
|
|
--metrics target/optimizer_bundle_metrics.json \
|
2021-09-17 00:02:17 +02:00
|
|
|
--metrics build/kibana/node_modules/@kbn/ui-shared-deps-src/shared_built_assets/metrics.json
|
2021-02-09 00:40:11 +01:00
|
|
|
|
2021-06-21 09:28:12 +02:00
|
|
|
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
|
|
|
|
installDir="$KIBANA_DIR/install/kibana"
|
|
|
|
mkdir -p "$installDir"
|
|
|
|
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
|
|
|
|
cp "$linuxBuild" "$WORKSPACE/kibana-default.tar.gz"
|
|
|
|
|
|
|
|
mkdir -p "$WORKSPACE/kibana-build"
|
|
|
|
cp -pR install/kibana/. $WORKSPACE/kibana-build/
|
|
|
|
|
|
|
|
echo " -> Archive built plugins"
|
|
|
|
shopt -s globstar
|
|
|
|
tar -zcf \
|
|
|
|
"$WORKSPACE/kibana-default-plugins.tar.gz" \
|
|
|
|
x-pack/plugins/**/target/public \
|
|
|
|
x-pack/test/**/target/public \
|
|
|
|
examples/**/target/public \
|
|
|
|
x-pack/examples/**/target/public \
|
|
|
|
test/**/target/public
|
2021-09-17 00:02:17 +02:00
|
|
|
shopt -u globstar
|