Skip to content

Commit

Permalink
Moved datadog-ci tag call to right after smp submit command.
Browse files Browse the repository at this point in the history
Signed-off-by: Caleb Metz <caleb.metz@datadoghq.com>
  • Loading branch information
cmetz100 committed Nov 6, 2024
1 parent a762cf0 commit c4cd7e2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .gitlab/functional_test/regression_detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -128,13 +135,7 @@ 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
# 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}
# 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}
job result
Expand Down

0 comments on commit c4cd7e2

Please sign in to comment.