Skip to content

Commit

Permalink
Enable benchmarks in gitlab CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bantonsson authored and duncanpharvey committed Jul 1, 2024
1 parent 43a3433 commit 43347d4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ variables:
value: "main"
description: "downstream jobs are triggered on this branch"

include:
- local: .gitlab/benchmarks.yml

trigger_internal_build:
variables:
LIBDATADOG_COMMIT_BRANCH: $CI_COMMIT_BRANCH
Expand All @@ -21,7 +24,7 @@ trigger_internal_build:
report_failure:
tags: ["arch:amd64"]
when: on_failure
needs: [trigger_internal_build]
needs: [trigger_internal_build, benchmarks]
# allow_failure: true prevents the job from showing up in github statuses (because it's filtered by gitsync)
allow_failure: true
script:
Expand Down
34 changes: 34 additions & 0 deletions .gitlab/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
variables:
BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:libdatadog-benchmarks
# The Dockerfile to this image is located at:
# https://github.com/DataDog/benchmarking-platform/tree/libdatadog/benchmarks

benchmarks:
tags: ["runner:apm-k8s-tweaked-metal"]
needs: []
image:
name: $BASE_CI_IMAGE
interruptible: true
timeout: 1h
script:
- export ARTIFACTS_DIR="$(pwd)/reports" && (mkdir "${ARTIFACTS_DIR}" || :)
- git clone --branch libdatadog/benchmarks https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform /platform && cd /platform
- ./steps/capture-hardware-software-info.sh
- ./steps/run-benchmarks.sh
- ./steps/analyze-results.sh
- "./steps/upload-results-to-s3.sh || :"
- "./steps/post-pr-comment.sh || :"
artifacts:
name: "reports"
paths:
- reports/
expire_in: 3 months
variables:
UPSTREAM_PROJECT_ID: $CI_PROJECT_ID # The ID of the current project. This ID is unique across all projects on the GitLab instance.
UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME # libdatadog
UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME # The branch or tag name for which project is built.
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA # The commit revision the project is built for.
UPSTREAM_REPO_URL: "https://github.com/DataDog/libdatadog" # The HTTP URL to the project's repository.

KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: libdatadog
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true"

0 comments on commit 43347d4

Please sign in to comment.