File tree Expand file tree Collapse file tree
utils/_context/_scenarios Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11include :
2- - remote : https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/9cf7d7609ff62e4723c9cbc061ca2a25345ce5d6055b9acad9a13dbf736261f0 /single-step-instrumentation-tests.yml
2+ - remote : https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/0b4d88122bb64a87131eeb9446a3671598790917ec30fc31851ccb6ee8375b8a /single-step-instrumentation-tests.yml
33stages :
44 - configure
55 - nodejs
Original file line number Diff line number Diff line change 11include :
2- - remote : https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/9cf7d7609ff62e4723c9cbc061ca2a25345ce5d6055b9acad9a13dbf736261f0 /single-step-instrumentation-tests.yml
2+ - remote : https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/0b4d88122bb64a87131eeb9446a3671598790917ec30fc31851ccb6ee8375b8a /single-step-instrumentation-tests.yml
33
44stages :
55 - SSI_TESTS
@@ -47,6 +47,21 @@ ssi_tests:
4747 done
4848 done
4949 fi
50+
51+ # Push JUnit results to Datadog Test Optimization
52+ export DATADOG_SITE="${DATADOG_SITE:-datadoghq.com}"
53+ export DATADOG_API_KEY=$(aws ssm get-parameter --region us-east-1 --name ci.${CI_PROJECT_NAME}.test_optimization.dd_api_key --with-decryption --query "Parameter.Value" --out text)
54+ export DD_TAGS="test.configuration.ci_environment:${CI_ENVIRONMENT:-prod}"
55+ if compgen -G "reports/logs*/reportJunit.xml" > /dev/null; then
56+ datadog-ci junit upload \
57+ reports/logs*/reportJunit.xml \
58+ --service system-tests \
59+ --env ci \
60+ --verbose \
61+ --xpath-tag "test.codeowners=/testcase/properties/property[@name='test.codeowners']"
62+ else
63+ echo "No reports/logs*/reportJunit.xml found; skipping Test Optimization upload"
64+ fi
5065 retry :
5166 max : 2
5267 when :
Original file line number Diff line number Diff line change @@ -290,6 +290,21 @@ def dd_apm_inject_version(self):
290290 def configuration (self ):
291291 return self ._configuration
292292
293+ def get_junit_properties (self ) -> dict [str , str ]:
294+ result = super ().get_junit_properties ()
295+
296+ result ["dd_tags[systest.suite.context.library.name]" ] = self .library .name
297+ result ["dd_tags[systest.suite.context.library.version]" ] = self .library .version
298+ result ["dd_tags[systest.suite.context.weblog_variant]" ] = self .weblog_variant
299+ result ["dd_tags[systest.suite.context.agent]" ] = self .components ["agent" ]
300+ result ["dd_tags[systest.suite.context.datadog-apm-inject.version]" ] = self .dd_apm_inject_version
301+ result ["dd_tags[systest.suite.context.datadog-installer.version]" ] = self .components ["datadog-installer" ]
302+ result ["dd_tags[systest.suite.context.installed_language_runtime]" ] = self .installed_language_runtime or ""
303+ result ["dd_tags[systest.suite.context.os]" ] = self .configuration ["os" ]
304+ result ["dd_tags[systest.suite.context.arch]" ] = self .configuration ["arch" ]
305+
306+ return result
307+
293308
294309class DockerSSIImageBuilder :
295310 """Manages the docker image building for the SSI scenario"""
You can’t perform that action at this time.
0 commit comments