ci: improve uploading test results (#31061)

* ci: ignore cargo2junit error

* ci: easing sanitized rules
This commit is contained in:
Yihau Chen 2023-04-05 18:25:36 +08:00 committed by GitHub
parent 60c4a718a5
commit 7d17d7094a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -32,15 +32,17 @@ else
fi
if [[ -n $BUILDKITE && -f "results.json" ]]; then
# prepare result file
awk '/{ "type": .* }/' results.json > sanitized-results.json
# extract lines which start with '{'
awk '/{.*/' results.json > sanitized-results.json
echo "~~~ Uploading test results to Buildkite Analytics"
buildkite-test-collector < sanitized-results.json
# upload to datadog
cargo2junit > results.xml < sanitized-results.json
datadog-ci junit upload --service solana results.xml
echo "~~~ Uploading test results to Datadog"
cargo2junit > results.xml < sanitized-results.json || true
if [[ -f "results.xml" ]]; then
datadog-ci junit upload --service solana results.xml
fi
fi
point_tags="pipeline=$BUILDKITE_PIPELINE_SLUG,job=$CI_LABEL,pr=$PR,success=$SUCCESS"