|
8 | 8 | - export SMP_ECR_HOST="${SMP_ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com" |
9 | 9 | - export ADP_IMG_BASE="${SMP_ECR_HOST}/${SMP_TEAM_ID}-saluki:adp-${CI_PIPELINE_ID}" |
10 | 10 | - export ADP_CHECKS_IMG_BASE="${SMP_ECR_HOST}/${SMP_TEAM_ID}-saluki:adp-checks-${CI_PIPELINE_ID}" |
| 11 | + - export SMP_IMG_BASE="${SMP_ECR_HOST}/${SMP_TEAM_ID}-saluki:agent-adp-${CI_PIPELINE_ID}" |
11 | 12 | - git fetch --verbose --deepen=999 origin ${CI_COMMIT_BRANCH} main |
12 | 13 |
|
| 14 | +# Layer the ADP image at ${ADP_IMG} into the converged Datadog Agent image and push it as |
| 15 | +# ${SMP_IMG}. Both the baseline and comparison build jobs end with this. |
| 16 | +# |
| 17 | +# SMP fixes one target image per job, and the tag filtering experiments need the Core Agent in the |
| 18 | +# picture: a `metric_tag_filterlist` is Agent configuration, and only reaches ADP over the config |
| 19 | +# stream. So every experiment runs against the converged image; the ones that don't care about the |
| 20 | +# Core Agent simply override the command to run ADP by itself, as they always have. |
| 21 | +.build-smp-target-image: &build-smp-target-image |
| 22 | + - docker buildx build |
| 23 | + --file ./docker/Dockerfile.datadog-agent |
| 24 | + --tag ${SMP_IMG} |
| 25 | + --build-arg DD_AGENT_IMAGE=registry.datadoghq.com/agent:${PUBLIC_DD_AGENT_VERSION} |
| 26 | + --build-arg ADP_IMAGE=${ADP_IMG} |
| 27 | + --label git.repository=${CI_PROJECT_NAME} |
| 28 | + --label git.branch=${CI_COMMIT_REF_NAME} |
| 29 | + --label git.commit=${CI_COMMIT_SHA} |
| 30 | + --label ci.pipeline_id=${CI_PIPELINE_ID} |
| 31 | + --label ci.job_id=${CI_JOB_ID} |
| 32 | + --push |
| 33 | + . |
| 34 | + |
13 | 35 | build-adp-baseline-image: |
14 | 36 | extends: .build-common-variables |
15 | 37 | stage: benchmark |
@@ -50,17 +72,22 @@ build-adp-baseline-image: |
50 | 72 | --build-arg SPDX_LICENSES_IMAGE=${SPDX_LICENSES_IMAGE} |
51 | 73 | --build-arg APP_IMAGE=${GBI_BASE_IMAGE} |
52 | 74 | --build-arg APP_GIT_HASH=${BASELINE_ADP_SHA} |
53 | | - --build-arg INTERNAL_BUILD=true |
54 | 75 | --label git.repository=${CI_PROJECT_NAME} |
55 | 76 | --label git.branch=${CI_COMMIT_REF_NAME} |
56 | 77 | --label git.commit=${CI_COMMIT_SHA} |
57 | 78 | --label ci.pipeline_id=${CI_PIPELINE_ID} |
58 | 79 | --label ci.job_id=${CI_JOB_ID} |
59 | 80 | --push |
60 | 81 | . |
| 82 | + # Bundle that ADP build into the converged Datadog Agent image, which is the image SMP |
| 83 | + # actually runs. |
| 84 | + - export ADP_IMG="${BASELINE_ADP_IMG}" |
| 85 | + - export SMP_IMG="${SMP_IMG_BASE}-${BASELINE_ADP_SHA}" |
| 86 | + - *build-smp-target-image |
61 | 87 | # Generate our image SHA/path for the runner job to use. |
62 | 88 | - echo "BASELINE_ADP_SHA=${BASELINE_ADP_SHA}" >> smp-vars.env |
63 | 89 | - echo "BASELINE_ADP_IMG=${BASELINE_ADP_IMG}" >> smp-vars.env |
| 90 | + - echo "BASELINE_SMP_IMG=${SMP_IMG}" >> smp-vars.env |
64 | 91 | artifacts: |
65 | 92 | reports: |
66 | 93 | dotenv: smp-vars.env |
@@ -102,17 +129,22 @@ build-adp-comparison-image: |
102 | 129 | --build-arg SPDX_LICENSES_IMAGE=${SPDX_LICENSES_IMAGE} |
103 | 130 | --build-arg APP_IMAGE=${GBI_BASE_IMAGE} |
104 | 131 | --build-arg APP_GIT_HASH=${COMPARISON_ADP_SHA} |
105 | | - --build-arg INTERNAL_BUILD=true |
106 | 132 | --label git.repository=${CI_PROJECT_NAME} |
107 | 133 | --label git.branch=${CI_COMMIT_REF_NAME} |
108 | 134 | --label git.commit=${CI_COMMIT_SHA} |
109 | 135 | --label ci.pipeline_id=${CI_PIPELINE_ID} |
110 | 136 | --label ci.job_id=${CI_JOB_ID} |
111 | 137 | --push |
112 | 138 | . |
| 139 | + # Bundle that ADP build into the converged Datadog Agent image, which is the image SMP |
| 140 | + # actually runs. |
| 141 | + - export ADP_IMG="${COMPARISON_ADP_IMG}" |
| 142 | + - export SMP_IMG="${SMP_IMG_BASE}-${COMPARISON_ADP_SHA}" |
| 143 | + - *build-smp-target-image |
113 | 144 | # Generate our image SHA/path for the runner job to use. |
114 | 145 | - echo "COMPARISON_ADP_SHA=${COMPARISON_ADP_SHA}" >> smp-vars.env |
115 | 146 | - echo "COMPARISON_ADP_IMG=${COMPARISON_ADP_IMG}" >> smp-vars.env |
| 147 | + - echo "COMPARISON_SMP_IMG=${SMP_IMG}" >> smp-vars.env |
116 | 148 | artifacts: |
117 | 149 | reports: |
118 | 150 | dotenv: smp-vars.env |
@@ -149,8 +181,8 @@ run-benchmarks-adp: |
149 | 181 | - ./smp --team-id ${SMP_TEAM_ID} --aws-named-profile ${AWS_NAMED_PROFILE} |
150 | 182 | job submit |
151 | 183 | --warmup-seconds 0 |
152 | | - --baseline-image ${BASELINE_ADP_IMG} |
153 | | - --comparison-image ${COMPARISON_ADP_IMG} |
| 184 | + --baseline-image ${BASELINE_SMP_IMG} |
| 185 | + --comparison-image ${COMPARISON_SMP_IMG} |
154 | 186 | --baseline-sha ${BASELINE_ADP_SHA} |
155 | 187 | --comparison-sha ${COMPARISON_ADP_SHA} |
156 | 188 | --target-config-dir ./test/smp/regression/adp/quality-gates/ |
@@ -241,8 +273,8 @@ run-benchmarks-adp-full: |
241 | 273 | - ./smp --team-id ${SMP_TEAM_ID} --aws-named-profile ${AWS_NAMED_PROFILE} |
242 | 274 | job submit |
243 | 275 | --warmup-seconds 0 |
244 | | - --baseline-image ${BASELINE_ADP_IMG} |
245 | | - --comparison-image ${COMPARISON_ADP_IMG} |
| 276 | + --baseline-image ${BASELINE_SMP_IMG} |
| 277 | + --comparison-image ${COMPARISON_SMP_IMG} |
246 | 278 | --baseline-sha ${BASELINE_ADP_SHA} |
247 | 279 | --comparison-sha ${COMPARISON_ADP_SHA} |
248 | 280 | --target-config-dir ./test/smp/regression/adp/full/ |
|
0 commit comments