From 7d6be816588ecded8a60f2e88936371b199ebfdd Mon Sep 17 00:00:00 2001 From: "John L. Peterson (Jack)" Date: Tue, 10 Dec 2024 14:21:43 -0500 Subject: [PATCH] OTEL-2289 fix ocb component build script (#31941) --- test/otel/testdata/ocb_build_script.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/otel/testdata/ocb_build_script.sh b/test/otel/testdata/ocb_build_script.sh index 6aaf8bfeb36b4..43dd7b34be343 100755 --- a/test/otel/testdata/ocb_build_script.sh +++ b/test/otel/testdata/ocb_build_script.sh @@ -4,7 +4,17 @@ OTELCOL_PID=0 mkdir -p /tmp/otel-ci trap 'rm -rf /tmp/otel-ci && kill $OTELCOL_PID' EXIT + +current_dir=$(pwd) cp ./test/otel/testdata/builder-config.yaml /tmp/otel-ci/ +# Get path of all datadog modules, in sorted order, without the initial dot +dd_mods=$(find . -type f -name "go.mod" -exec dirname {} \; | sort | sed 's/.//') +echo "replaces:" >> "/tmp/otel-ci/builder-config.yaml" +for mod in $dd_mods; do + echo "- github.com/DataDog/datadog-agent$mod => $current_dir$mod" >> /tmp/otel-ci/builder-config.yaml +done +echo "added all datadog-agent modules to ocb builder-config replacements" + cp ./test/otel/testdata/collector-config.yaml /tmp/otel-ci/ cp ./tools/ci/retry.sh /tmp/otel-ci/ chmod +x /tmp/otel-ci/retry.sh