diff --git a/.gitlab/functional_test/regression_detector.yml b/.gitlab/functional_test/regression_detector.yml index 599082bebda50..26d17a967dfbb 100644 --- a/.gitlab/functional_test/regression_detector.yml +++ b/.gitlab/functional_test/regression_detector.yml @@ -109,6 +109,13 @@ single-machine-performance-regression_detector: --comparison-sha ${CI_COMMIT_SHA} --target-config-dir test/regression/ --submission-metadata submission_metadata + # `datadog-ci` relies on `DATADOG_API_KEY` so we get that here. + - DATADOG_API_KEY="$("$CI_PROJECT_DIR"/tools/ci/fetch_secret.sh "$AGENT_API_KEY_ORG2" token)" || exit $?; export DATADOG_API_KEY + # Get the SMP Job Id from 'submission-metadata' and use 'datadog-ci' + # to tag the gitlab job seen in CI Visibility with the SMP Job Id. + - SMP_JOB_ID=$(jq -r '.jobId' submission_metadata) + - echo "SMP Job Id is ${SMP_JOB_ID}" + - datadog-ci tag --level job --tags job_id:${SMP_JOB_ID} # Wait for job to complete. - RUST_LOG="${RUST_LOG}" ./smp --team-id ${SMP_AGENT_TEAM_ID} --api-base ${SMP_API} --aws-named-profile ${AWS_NAMED_PROFILE} job status @@ -128,7 +135,6 @@ single-machine-performance-regression_detector: # invoke task has additional logic that does not seem to apply well to SMP's # JUnit XML. Agent CI seems to use `datadog-agent` as the service name when # uploading JUnit XML, so the upload command below respects that convention. - - DATADOG_API_KEY="$("$CI_PROJECT_DIR"/tools/ci/fetch_secret.sh "$AGENT_API_KEY_ORG2" token)" || exit $?; export DATADOG_API_KEY - datadog-ci junit upload --service datadog-agent outputs/junit.xml # Finally, exit 1 if the job signals a regression else 0. - RUST_LOG="${RUST_LOG}" ./smp --team-id ${SMP_AGENT_TEAM_ID} --api-base ${SMP_API} --aws-named-profile ${AWS_NAMED_PROFILE}