@@ -35,20 +35,53 @@ build-nginx-module:
3535 - .musl-build/ngx_http_datadog_module.so
3636 expire_in : 3 months
3737
38+ download-artifacts :
39+ stage : build
40+ tags : ["arch:amd64"]
41+ needs :
42+ - job : build-nginx-module
43+ artifacts : true
44+ image : $MACROBENCHMARKS_CI_IMAGE
45+ script :
46+ - |
47+ set -e
48+ echo "Installing vault"
49+ cd /tmp
50+ curl -o vault.zip https://releases.hashicorp.com/vault/1.20.0/vault_1.20.0_linux_amd64.zip
51+ unzip vault.zip
52+ cd -
53+ - export CIRCLECI_TOKEN=$(/tmp/vault kv get --format=json kv/k8s/gitlab-runner/nginx-datadog/circleci | jq -r .data.data.token)
54+ # this is a token only giving read access to public data
55+ - export GITHUB_TOKEN=$(/tmp/vault kv get --format=json kv/k8s/gitlab-runner/nginx-datadog/github_pub | jq -r .data.data.token)
56+ - git clone --branch glopes/cpp/nginx https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform platform
57+ - cd platform
58+ - ' [[ -z "$CI_COMMIT_BRANCH" ]] || ARTIFACT_ROLE=baseline steps/install-dd-nginx-module.sh'
59+ - ARTIFACT_ROLE=candidate steps/install-dd-nginx-module.sh
60+ - cd -
61+ - mkdir -p artifacts
62+ - cp -v platform/artifacts/*.so* artifacts/
63+ artifacts :
64+ name : artifacts
65+ when : always
66+ paths :
67+ - artifacts
68+ expire_in : 1 month
69+ variables :
70+ TEST_ARTIFACT : $CI_PROJECT_DIR/.musl-build/ngx_http_datadog_module.so
3871
3972.benchmarks :
4073 stage : run-benchmarks
41- needs : ["build-nginx-module "]
74+ dependencies : ["download-artifacts "]
4275 tags : ["runner:apm-k8s-same-cpu"]
4376 timeout : 1h
4477 image : $MACROBENCHMARKS_CI_IMAGE
4578 script :
46- - cp .musl-build/ngx_http_datadog_module.so /usr/lib/nginx/modules/ngx_http_datadog_module.so
47- - git clone --branch glopes/cpp/nginx https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform platform && cd platform
48- - bp-runner bp-runner.yml --debug
49- - mkdir -p artifacts
79+ - git clone --branch glopes/cpp/nginx https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform platform
80+ - mkdir -p platform/artifacts
81+ - cp -v artifacts/* platform/artifacts
82+ - cd platform && bp-runner bp-runner.yml --debug
83+ - cd -
5084 - cp -v platform/artifacts/*.converted.json artifacts/
51- - cp -v platform/artifacts/*.so artifacts/
5285 - cp -v platform/artifacts/lscpu.txt artifacts/
5386 artifacts :
5487 name : artifacts
@@ -88,20 +121,10 @@ build-nginx-module:
88121 extends : .benchmarks
89122 variables :
90123 ARTIFACT_ROLE : candidate
91- TEST_ARTIFACT : $CI_PROJECT_DIR/.musl-build/ngx_http_datadog_module.so
92124
93125.baseline-benchmarks :
94126 extends : .benchmarks
95127 before_script :
96- - |
97- echo "Installing vault"
98- cd /tmp
99- curl -o vault.zip https://releases.hashicorp.com/vault/1.20.0/vault_1.20.0_linux_amd64.zip
100- unzip vault.zip
101- cd -
102- - CIRCLECI_TOKEN=$(/tmp/vault kv get --format=json kv/k8s/gitlab-runner/nginx-datadog/circleci | jq -r .data.data.token)
103- # this is a token only giving read access to public data
104- - GITHUB_TOKEN=$(/tmp/vault kv get --format=json kv/k8s/gitlab-runner/nginx-datadog/github_pub | jq -r .data.data.token)
105128 variables :
106129 ARTIFACT_ROLE : baseline
107130 rules :
@@ -144,6 +167,7 @@ compare-candidate-baseline:
144167 needs : ["baseline-only-tracing", "candidate-only-tracing", "baseline-appsec", "candidate-appsec"]
145168 script :
146169 - git clone --branch glopes/cpp/nginx https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform platform && cd platform
170+ - mkdir -p platform/artifacts
147171 - cp -v artifacts/* platform/artifacts
148172 - cd platform
149173 - steps/analyze-results.sh
0 commit comments