Skip to content

Commit 7295d0d

Browse files
authored
Merge pull request DataDog#15139 from DataDog/drodriguezhdez/ci_app_jenkins_correlate_workers
[CIAPP] Add instructions to correlate pipelines executed in Jenkins workers with infrastructure metrics.
2 parents 3a63e3d + 1ac0e70 commit 7295d0d

File tree

1 file changed

+22
-2
lines changed
  • content/en/continuous_integration/setup_pipelines

1 file changed

+22
-2
lines changed

content/en/continuous_integration/setup_pipelines/jenkins.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ further_reading:
2020
## Compatibility
2121

2222
Supported Jenkins versions:
23-
* For 3.x versions of the plugin: Jenkins >= 2.164.1
24-
* For 4.x versions of the plugin: Jenkins >= 2.303.3
23+
* Jenkins >= 2.346.1
2524

2625
## Prerequisite
2726

@@ -142,6 +141,27 @@ Re/Initialize Datadog-Plugin Agent Http Client
142141
TRACE -> http://<HOST>:<TRACE_PORT>/v0.3/traces
143142
{{< /code-block >}}
144143

144+
### Infrastructure metric correlation
145+
146+
If you are using Jenkins workers, you can corralate pipelines with the infrastructure that is running them. For this feature to work:
147+
148+
1. Install the [Datadog Agent][1] in every Jenkins worker.
149+
2. Set and export a new environment variable called `DD_CI_HOSTNAME` in every Jenkins worker with the worker hostname.
150+
* It must be the same hostname that the Datadog Agent is reporting in the infrastructure metrics for that worker.
151+
* You can use fixed values or other environment variables as valid values.
152+
153+
```bash
154+
# Using fixed value
155+
export DD_CI_HOSTNAME=my-hostname
156+
157+
# Using other environment variable
158+
export DD_CI_HOSTNAME=$HOSTNAME
159+
```
160+
161+
This is only required for Jenkins workers. For the Jenkins controller, the infrastructure metric correlation does not require additional actions.
162+
163+
**Note**: Infrastructure metric correlation is supported since Jenkins Plugin v5.0.0+
164+
145165
## Enable job log collection
146166

147167
This is an optional step that enables the collection of job logs. It involves two steps: enabling the job collection port on the Datadog Agent, and enabling job collection on the Datadog Plugin.

0 commit comments

Comments
 (0)