Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass smp job id through ci #30782

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .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,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}
Expand Down
Loading