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 33 extends : [
44 'config:best-practices' ,
55 'helpers:pinGitHubActionDigestsToSemver' ,
6+ 'customManagers:githubActionsVersions'
67 ] ,
78 packageRules : [
89 {
Original file line number Diff line number Diff line change 88 pull_request :
99 workflow_dispatch :
1010
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+
1116concurrency :
1217 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1318 cancel-in-progress : true
Original file line number Diff line number Diff line change 88permissions :
99 contents : read
1010
11+ env :
12+ # renovate: datasource=github-releases depName=opentelemetry-collector packageName=open-telemetry/opentelemetry-collector-releases
13+ OTEL_COLLECTOR_VERSION : v0.132.2
14+
1115jobs :
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+
1226 copy-images :
27+ needs : set-collector-version
1328 permissions :
1429 contents : read
1530 packages : write
1833 include :
1934 - source : jaegertracing/all-in-one:1.32
2035 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 }}
2338 - source : shopify/toxiproxy:latest
2439 target_image : toxiproxy
2540 - source : eclipse-temurin:17-jre-focal
Original file line number Diff line number Diff line change 6060class CollectorIntegrationTest {
6161
6262 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+
6475 private static final Integer COLLECTOR_HEALTH_CHECK_PORT = 13133 ;
6576
6677 private static int prometheusPort ;
Original file line number Diff line number Diff line change @@ -115,7 +115,18 @@ abstract class OtlpExporterIntegrationTest {
115115 private static final AttributeKey <String > SERVICE_NAME = AttributeKey .stringKey ("service.name" );
116116
117117 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+
119130 private static final Integer COLLECTOR_OTLP_GRPC_PORT = 4317 ;
120131 private static final Integer COLLECTOR_OTLP_HTTP_PORT = 4318 ;
121132 private static final Integer COLLECTOR_OTLP_GRPC_MTLS_PORT = 5317 ;
You can’t perform that action at this time.
0 commit comments