Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ jobs:
summary-post: ${{ inputs.summary-post }}
upload-name: ${{ inputs.upload-name }}
upload-path: ${{ inputs.upload-path }}
upload-junit-name: junit-xml-${{ inputs.target-name || inputs.target }}-${{ inputs.arch || 'x64' }}
upload-junit-path: container/envoy/*/generated/test-results/**/*.xml
warning-match: ${{ inputs.warning-match }}
working-directory: ${{ inputs.working-directory }}
env:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/datadog-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Datadog CI Visibility

permissions:
actions: read
contents: read

on:
workflow_run:
workflows: ["Envoy/Checks"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be part of the request/finish

types:
- completed

jobs:
upload:
runs-on: ubuntu-24.04
if: |
github.repository == 'envoyproxy/envoy'
&& github.event.workflow_run.conclusion != 'skipped'
steps:
- name: Download JUnit XML artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: junit-xml-*
merge-multiple: true
path: junit-reports

- name: Check for report files
id: check-files
run: |
if [ -d junit-reports ] && [ "$(find junit-reports -name '*.xml' | wc -l)" -gt 0 ]; then
echo "has_reports=true" >> "$GITHUB_OUTPUT"
else
echo "No JUnit reports found to upload."
echo "has_reports=false" >> "$GITHUB_OUTPUT"
fi
shell: bash

- name: Upload test results to Datadog CI Visibility
if: steps.check-files.outputs.has_reports == 'true'
uses: datadog/github-action-upload-junit@7f8cd36e2f694dbf069177a64112e75306cd10e9 # v1.4.0
with:
api-key: ${{ secrets.DD_API_KEY }}
service: envoy-ci
files: "junit-reports/**/*.xml"
4 changes: 4 additions & 0 deletions ci/build_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ export ENVOY_FUZZ_COVERAGE_ARTIFACT="${ENVOY_BUILD_DIR}/generated/fuzz_coverage.
export ENVOY_FAILED_TEST_LOGS="${ENVOY_BUILD_DIR}"/generated/failed-testlogs
mkdir -p "${ENVOY_FAILED_TEST_LOGS}"

# This is where we copy JUnit XML test reports for CI collection/publishing.
export ENVOY_TEST_RESULTS="${ENVOY_BUILD_DIR}"/generated/test-results
mkdir -p "${ENVOY_TEST_RESULTS}"

# This is where we copy the build profile to.
export ENVOY_BUILD_PROFILE="${ENVOY_BUILD_DIR}"/generated/build-profile
mkdir -p "${ENVOY_BUILD_PROFILE}"
Expand Down
11 changes: 11 additions & 0 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ CI_TARGET=$1
# shellcheck source=ci/build_setup.sh
. "${CURRENT_SCRIPT_DIR}"/build_setup.sh

# Register exit trap to collect all Bazel JUnit XML test reports before the script exits.
collect_junit_reports() {
if [[ -d "bazel-testlogs" && -n "${ENVOY_TEST_RESULTS}" ]]; then
echo "Collecting JUnit XML test reports..."
pushd bazel-testlogs >/dev/null
find . -name "test.xml" -exec cp --parents -f {} "${ENVOY_TEST_RESULTS}" \; 2>/dev/null || true
popd >/dev/null
fi
}
trap collect_junit_reports EXIT

echo "building for ${ENVOY_BUILD_ARCH}"

cd "${SRCDIR}"
Expand Down
Loading