Files
go-otel/build.sh
T
mats 21f04d696b
Build and Publish / Metadata (push) Successful in 2s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 58s
more otel
2026-09-18 20:51:37 +00:00

31 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
RELEASE="${RELEASE:-$(git rev-parse --short HEAD)}"
PUBLIC_SOURCEMAPS="${PUBLIC_SOURCEMAPS:-false}"
docker build \
--build-arg "APP_RELEASE=${RELEASE}" \
--build-arg "PUBLIC_SOURCEMAPS=${PUBLIC_SOURCEMAPS}" \
-t matst80/otel-debug:latest .
docker push matst80/otel-debug:latest
kubectl rollout restart deployment otel-debug-receiver -n monitoring
kubectl rollout status deployment/otel-debug-receiver -n monitoring
# Docker builds intentionally omit public source maps. If the public receiver
# URL is present, build the same release locally and upload maps to the running
# receiver. The Kubernetes source-map volume is currently
# emptyDir, so upload after the rollout rather than before it.
if [[ -n "${OTEL_URL:-}" ]]; then
VITE_APP_RELEASE="$RELEASE" npm --prefix otel-ui run build
while IFS= read -r -d '' map; do
bundle="${map%.map}"
RELEASE="$RELEASE" OTEL_URL="$OTEL_URL" \
./scripts/upload-sourcemap.sh "$bundle"
done < <(find otel-ui/dist -type f -name '*.js.map' -print0)
find otel-ui/dist -type f -name '*.map' -delete
fi
kubectl logs -f deployment/otel-debug-receiver -n monitoring