Skip to content

Commit b1a6c71

Browse files
use agentless
1 parent 2dcd124 commit b1a6c71

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

ci/get_dd_api_key.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# Unless explicitly stated otherwise all files in this repository are licensed
4+
# under the Apache License Version 2.0.
5+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
6+
7+
# Loads DD_API_KEY from Vault for CI jobs that need Datadog API access without
8+
# assuming an AWS role (e.g. unit-test Test Optimization agentless reporting).
9+
10+
set -e
11+
12+
printf "Getting DD API KEY...\n"
13+
14+
export DD_API_KEY=$(vault kv get -field=dd-api-key kv/k8s/gitlab-runner/datadog-lambda-python/secrets)

ci/input_files/build.yaml.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ unit-test ({{ $runtime.name }}-{{ $runtime.arch }}):
8282
{{ end }}
8383
image: registry.ddbuild.io/images/mirror/python:{{ $runtime.image }}
8484
cache: &{{ $runtime.name }}-{{ $runtime.arch }}-cache
85+
variables:
86+
DD_CIVISIBILITY_AGENTLESS_ENABLED: "true"
87+
DD_SERVICE: "datadog-lambda-python-{{ $runtime.python_version }}-{{ $runtime.arch }}"
88+
DD_ENV: "ci"
8589
before_script:
90+
- source ./ci/get_dd_api_key.sh
8691
- PYTHON_VERSION={{ $runtime.python_version }} ARCH={{ $runtime.arch }} ./scripts/setup_python_env.sh
8792
script:
8893
- source venv/bin/activate

0 commit comments

Comments
 (0)