mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Kinda sneaky...since we already mutate the jest portion of the file system (target/kibana-coverage/jest) by dumping "jest unit" & "jest integration" coverage into the same "final" directory...go ahead an make "jest integration" use the same ran file designator as "jest unit". This saves me from having to add logic for this later on.
52 lines
1.3 KiB
Bash
Executable file
52 lines
1.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
COVERAGE_JOB_NAME=$1
|
|
export COVERAGE_JOB_NAME
|
|
echo "### debug COVERAGE_JOB_NAME: ${COVERAGE_JOB_NAME}"
|
|
|
|
BUILD_ID=$2
|
|
export BUILD_ID
|
|
|
|
CI_RUN_URL=$3
|
|
export CI_RUN_URL
|
|
echo "### debug CI_RUN_URL: ${CI_RUN_URL}"
|
|
|
|
FETCHED_PREVIOUS=$4
|
|
export FETCHED_PREVIOUS
|
|
echo "### debug FETCHED_PREVIOUS: ${FETCHED_PREVIOUS}"
|
|
|
|
ES_HOST="https://${USER_FROM_VAULT}:${PASS_FROM_VAULT}@${HOST_FROM_VAULT}"
|
|
export ES_HOST
|
|
|
|
STATIC_SITE_URL_BASE='https://kibana-coverage.elastic.dev'
|
|
export STATIC_SITE_URL_BASE
|
|
|
|
TEAM_ASSIGN_PATH=$5
|
|
echo "### debug TEAM_ASSIGN_PATH: ${TEAM_ASSIGN_PATH}"
|
|
|
|
BUFFER_SIZE=500
|
|
export BUFFER_SIZE
|
|
|
|
ingestModular() {
|
|
local xs=("$@")
|
|
|
|
echo "--- Generate Team Assignments"
|
|
CI_STATS_DISABLED=true node scripts/generate_team_assignments.js \
|
|
--verbose --src '.github/CODEOWNERS' --dest "$TEAM_ASSIGN_PATH"
|
|
|
|
echo "--- Ingest results to Kibana stats cluster"
|
|
for x in "${xs[@]}"; do
|
|
echo "--- Ingesting coverage for ${x}"
|
|
|
|
COVERAGE_SUMMARY_FILE="target/kibana-coverage/${x}-combined/coverage-summary.json"
|
|
|
|
CI_STATS_DISABLED=true node scripts/ingest_coverage.js --path "${COVERAGE_SUMMARY_FILE}" \
|
|
--vcsInfoPath ./VCS_INFO.txt --teamAssignmentsPath "$TEAM_ASSIGN_PATH" &
|
|
done
|
|
wait
|
|
|
|
echo "--- Ingesting Code Coverage - Complete"
|
|
echo ""
|
|
}
|