File tree Expand file tree Collapse file tree 5 files changed +47
-4
lines changed
exporters/prometheus/src/test/java/io/opentelemetry/exporter/prometheus
integration-tests/otlp/src/main/java/io/opentelemetry/integrationtest Expand file tree Collapse file tree 5 files changed +47
-4
lines changed Original file line number Diff line number Diff line change 3
3
extends : [
4
4
'config:best-practices' ,
5
5
'helpers:pinGitHubActionDigestsToSemver' ,
6
+ 'customManagers:githubActionsVersions'
6
7
] ,
7
8
packageRules : [
8
9
{
Original file line number Diff line number Diff line change 8
8
pull_request :
9
9
workflow_dispatch :
10
10
11
+ # env:
12
+ # uncomment once the collector has been pushed in the daily workflow
13
+ # renovate: datasource=github-releases depName=opentelemetry-collector packageName=open-telemetry/opentelemetry-collector-releases
14
+ # OTEL_COLLECTOR_VERSION: v0.132.2
15
+
11
16
concurrency :
12
17
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
13
18
cancel-in-progress : true
Original file line number Diff line number Diff line change 8
8
permissions :
9
9
contents : read
10
10
11
+ env :
12
+ # renovate: datasource=github-releases depName=opentelemetry-collector packageName=open-telemetry/opentelemetry-collector-releases
13
+ OTEL_COLLECTOR_VERSION : v0.132.2
14
+
11
15
jobs :
16
+ set-collector-version :
17
+ runs-on : ubuntu-latest
18
+ outputs :
19
+ otel_collector_version : ${{ steps.set-version.outputs.version }}
20
+ steps :
21
+ - name : Set OpenTelemetry Collector version
22
+ id : set-version
23
+ # strip the "v" from the version
24
+ run : echo "version=${OTEL_COLLECTOR_VERSION#v}" >> $GITHUB_OUTPUT
25
+
12
26
copy-images :
27
+ needs : set-collector-version
13
28
permissions :
14
29
contents : read
15
30
packages : write
18
33
include :
19
34
- source : jaegertracing/all-in-one:1.32
20
35
target_image : jaeger:1.32
21
- - source : otel/opentelemetry-collector-contrib:latest
22
- target_image : otel-collector
36
+ - source : otel/opentelemetry-collector-contrib:${{ needs.set-collector-version.outputs.otel_collector_version }}
37
+ target_image : otel-collector:${{ needs.set-collector-version.outputs.otel_collector_version }}
23
38
- source : shopify/toxiproxy:latest
24
39
target_image : toxiproxy
25
40
- source : eclipse-temurin:17-jre-focal
Original file line number Diff line number Diff line change 60
60
class CollectorIntegrationTest {
61
61
62
62
private static final String COLLECTOR_IMAGE =
63
- "ghcr.io/open-telemetry/opentelemetry-java/otel-collector" ;
63
+ "ghcr.io/open-telemetry/opentelemetry-java/otel-collector" + collectorVersion ();
64
+
65
+ private static String collectorVersion () {
66
+ String otelCollectorVersion = System .getenv ("OTEL_COLLECTOR_VERSION" );
67
+ if (otelCollectorVersion != null ) {
68
+ // strip the leading 'v'
69
+ return ":" + otelCollectorVersion .substring (1 );
70
+ }
71
+ // Default to latest if not set
72
+ return ":latest" ;
73
+ }
74
+
64
75
private static final Integer COLLECTOR_HEALTH_CHECK_PORT = 13133 ;
65
76
66
77
private static int prometheusPort ;
Original file line number Diff line number Diff line change @@ -115,7 +115,18 @@ abstract class OtlpExporterIntegrationTest {
115
115
private static final AttributeKey <String > SERVICE_NAME = AttributeKey .stringKey ("service.name" );
116
116
117
117
private static final String COLLECTOR_IMAGE =
118
- "ghcr.io/open-telemetry/opentelemetry-java/otel-collector" ;
118
+ "ghcr.io/open-telemetry/opentelemetry-java/otel-collector" + collectorVersion ();
119
+
120
+ private static String collectorVersion () {
121
+ String otelCollectorVersion = System .getenv ("OTEL_COLLECTOR_VERSION" );
122
+ if (otelCollectorVersion != null ) {
123
+ // strip the leading 'v'
124
+ return ":" + otelCollectorVersion .substring (1 );
125
+ }
126
+ // Default to latest if not set
127
+ return ":latest" ;
128
+ }
129
+
119
130
private static final Integer COLLECTOR_OTLP_GRPC_PORT = 4317 ;
120
131
private static final Integer COLLECTOR_OTLP_HTTP_PORT = 4318 ;
121
132
private static final Integer COLLECTOR_OTLP_GRPC_MTLS_PORT = 5317 ;
You can’t perform that action at this time.
0 commit comments