Skip to content

feat: download opentelemetry jar outside of Dockerfile#697

Merged
paullatzelsperger merged 3 commits intoeclipse-tractusx:mainfrom
paullatzelsperger:feat/686_download_opentelemetry_jar_only_once
Aug 9, 2023
Merged

feat: download opentelemetry jar outside of Dockerfile#697
paullatzelsperger merged 3 commits intoeclipse-tractusx:mainfrom
paullatzelsperger:feat/686_download_opentelemetry_jar_only_once

Conversation

@paullatzelsperger
Copy link
Copy Markdown
Contributor

WHAT

Downloads the OpenTelemetry Agent jar "outside" of the Dockerfile. This is actually done in two locations:

  1. the build.gradle.kts file: a Gradle task is added for this
  2. the publish-docker-image action: a GH Actions step is added, because when publishing we don't use the Gradle Docker task

WHY

Downloading the OTEL Agent inside Docker required adding curl first, and due to security restrictions that required a fixed version. APK, Alpine Linux's package manager, seems to not keep older versions around, which caused the build to break whenever a new version of curl was released.

FURTHER NOTES

  • Docker can't use resources outside of its build context, that is why the Gradle task downloads the opentelemetry-javaagent.jar once per project, directly to each project's build/ folder.

Closes #686

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Aug 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@paullatzelsperger paullatzelsperger merged commit f7441b7 into eclipse-tractusx:main Aug 9, 2023
RoseMgbii-b pushed a commit to RoseMgbii-b/tractusx-edc that referenced this pull request Mar 5, 2026
…usx#697)

* feat: download opentelemetry agent only once

* update docker files

* update GH action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

Dockerfiles: download opentelemetry-javaagent.jar externally

3 participants