Skip to content

Instantly share code, notes, and snippets.

View Badbond's full-sized avatar

Pieter Dirk Soels Badbond

View GitHub Profile
@Badbond
Badbond / jacoco_generate_report.sh
Created March 16, 2023 20:28
JaCoCo -- Generate HTML report from coverage data and (compiled) source code
#!/usr/bin/env bash
set -e -u -o pipefail
if [[ "${#}" -lt 2 ]]; then
echo "Usage: ${0} <path-to-jacococli.jar> [--sourcefiles-matcher=<string>] [ --classfiles-miles-matcher<string>] <source-roots>..."
exit 1
fi
JACOCO_CLI_LOCAL="$(realpath "${1}")"
@Badbond
Badbond / jacoco_extract_data.sh
Created March 15, 2023 16:25
JaCoCo -- Extract coverage data from Kubernetes pods
#!/usr/bin/env bash
set -e -u -o pipefail
if [ "${#}" -lt 4 ]; then
echo "Usage: ${0} <path-to-jacococli.jar> <kubernetes-context> <kubernetes-namespace> <kubernetes-pod-selector>"
echo "For selector syntax, see https://kubernetes.io/docs/concepts/overview/working-with-objects/labels."
exit 1
fi