kibana/.buildkite/scripts/steps/code_coverage/reporting/collectVcsInfo.sh
Tre d92440e631
[QA][Code Coverage] Modularize Code Coverage (#133759)
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.
2022-06-13 15:40:59 +01:00

32 lines
580 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
echo "--- collect VCS Info"
echo "### Prok'd Index File: ..."
cat src/dev/code_coverage/www/index.html
predicate() {
x=$1
if [ -n "$x" ]; then
return
else
echo "### 1 or more variables that Code Coverage needs, are undefined"
exit 1
fi
}
CMD="git log --pretty=format"
XS=("${GIT_BRANCH}" \
"$(${CMD}":%h" -1)" \
"$(${CMD}":%an" -1)" \
"$(${CMD}":%s" -1)")
touch VCS_INFO.txt
for X in "${!XS[@]}"; do
{
predicate "${XS[X]}"
echo "${XS[X]}" >> VCS_INFO.txt
}
done
echo "### VCS_INFO:"
cat VCS_INFO.txt