Skip to content

Commit 16eaf8b

Browse files
authored
Reduce the output of the junit upload on success (#3593)
Signed-off-by: Bob Weinand <[email protected]>
1 parent e24c6c2 commit 16eaf8b

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

.gitlab/generate-appsec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
after_script:
146146
- mkdir -p "${CI_PROJECT_DIR}/artifacts"
147147
- find appsec/tests/integration/build/test-results -name "*.xml" -exec cp --parents '{}' "${CI_PROJECT_DIR}/artifacts/" \;
148-
- .gitlab/upload-junit-to-datadog.sh "test.source.file:appsec"
148+
- .gitlab/silent-upload-junit-to-datadog.sh "test.source.file:appsec"
149149
artifacts:
150150
reports:
151151
junit: "artifacts/**/test-results/**/TEST-*.xml"

.gitlab/generate-profiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
after_script:
5959
- |
6060
if [ "${IMAGE_SUFFIX}" != "_centos-7" ]; then
61-
.gitlab/upload-junit-to-datadog.sh "test.source.file:profiling"
61+
.gitlab/silent-upload-junit-to-datadog.sh "test.source.file:profiling"
6262
else
6363
echo "Skipping JUnit upload on CentOS 7 (old glibc/OpenSSL incompatible with datadog-ci)"
6464
fi

.gitlab/generate-shared.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
after_script:
3434
- mkdir -p tmp/artifacts
3535
- cp tmp/build_php_components_asan/Testing/Temporary/LastTest.log tmp/artifacts/LastTestASan.log
36-
- .gitlab/upload-junit-to-datadog.sh "test.source.file:components-rs"
36+
- .gitlab/silent-upload-junit-to-datadog.sh "test.source.file:components-rs"
3737
artifacts:
3838
reports:
3939
junit: "artifacts/*-results.xml"
@@ -57,7 +57,7 @@
5757
after_script:
5858
- mkdir -p tmp/artifacts
5959
- cp tmp/build_php_components_ubsan/Testing/Temporary/LastTest.log tmp/artifacts/LastTestUBSan.log
60-
- .gitlab/upload-junit-to-datadog.sh "test.source.file:components-rs"
60+
- .gitlab/silent-upload-junit-to-datadog.sh "test.source.file:components-rs"
6161
artifacts:
6262
reports:
6363
junit: "artifacts/*-results.xml"
@@ -85,7 +85,7 @@
8585
after_script:
8686
- mkdir -p tmp/artifacts/
8787
- cp tmp/build-tea-${SWITCH_PHP_VERSION}/Testing/Temporary/LastTest.log tmp/artifacts/LastTest.log
88-
- .gitlab/upload-junit-to-datadog.sh "test.source.file:zend_abstract_interface"
88+
- .gitlab/silent-upload-junit-to-datadog.sh "test.source.file:zend_abstract_interface"
8989
artifacts:
9090
reports:
9191
junit: "artifacts/*-results.xml"
@@ -107,7 +107,7 @@
107107
after_script:
108108
- mkdir -p tmp/artifacts
109109
- cp tmp/build*/Testing/Temporary/LastTest.log tmp/artifacts/LastTest.log
110-
- .gitlab/upload-junit-to-datadog.sh "test.source.file:zend_abstract_interface"
110+
- .gitlab/silent-upload-junit-to-datadog.sh "test.source.file:zend_abstract_interface"
111111
artifacts:
112112
reports:
113113
junit: "artifacts/*-results.xml"

.gitlab/generate-tracer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function after_script($execute_dir = ".", $has_test_agent = false) {
2323
- .gitlab/check_test_agent.sh
2424
<?php endif; ?>
2525
- .gitlab/collect_artifacts.sh "<?= $execute_dir ?>"
26-
- .gitlab/upload-junit-to-datadog.sh "test.source.file:src"
26+
- .gitlab/silent-upload-junit-to-datadog.sh "test.source.file:src"
2727
<?php
2828
}
2929

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
OUTFILE=/tmp/datadog-junit-upload.txt
3+
"$(dirname -- "${BASH_SOURCE[0]}")"/upload-junit-to-datadog.sh "$@" >$OUTFILE 2>&1
4+
if [[ $? -ne 0 ]]; then
5+
cat $OUTFILE
6+
else
7+
grep -E '^\* ' $OUTFILE
8+
fi

0 commit comments

Comments
 (0)