-
Notifications
You must be signed in to change notification settings - Fork 780
/
Copy pathdocker-compose.yml
43 lines (39 loc) · 1.43 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Starts an OpenTelemetry Collector and then runs the OTLP exporter integration tests.
# This should be run from the root of the repo:
# docker compose --file=test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest/docker-compose.yml --project-directory=. up --exit-code-from=tests --build
version: '3.7'
services:
init-service:
image: otel-test-image
build:
context: .
dockerfile: ./test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest/Dockerfile
volumes:
- ./test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest:/cfg
command: >
sh -c "
mkdir -p /cfg/certs;
cp /test/*.pem /cfg/certs/;
chmod 644 /cfg/certs/*;
sleep 1000;
"
otel-collector:
image: otel/opentelemetry-collector
volumes:
- ./test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest:/cfg
command: --config=/cfg/otel-collector-config.yaml
depends_on:
- init-service
tests:
image: otel-test-image
build:
context: .
dockerfile: ./test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest/Dockerfile
volumes:
- ./test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest:/cfg
command: /cfg/run-test.sh
environment:
OTEL_COLLECTOR_HOSTNAME: otel-collector
OTEL_MOCK_COLLECTOR_HOSTNAME: mock-otel-collector
depends_on:
- otel-collector