From ef2a71885badce2445d8df461a890385a4b9e8cc Mon Sep 17 00:00:00 2001 From: Hanna Kurhuzenkava Date: Fri, 13 Dec 2024 22:59:07 +0300 Subject: [PATCH] Update `Dockerfile` to include git metadata and version changes Added support for passing git repository URL and commit SHA as build arguments to the `Dockerfile`, ensuring these are set as environment variables in the image. Also updated the `DD_VERSION` argument value to a more descriptive identifier. --- teamcity/app-server.Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/teamcity/app-server.Dockerfile b/teamcity/app-server.Dockerfile index 3ebc2f5a..f95f8bf6 100644 --- a/teamcity/app-server.Dockerfile +++ b/teamcity/app-server.Dockerfile @@ -3,12 +3,17 @@ FROM openjdk:17 COPY --from=datadog/serverless-init:1 /datadog-init /app/datadog-init ADD 'https://dtdg.co/latest-java-tracer' /dd_tracer/java/dd-java-agent.jar -ARG DD_VERSION=1 +ARG DD_VERSION=Aardvark-v0.1 ENV DD_SERVICE=app-server ENV DD_ENV=prod ENV DD_VERSION=$DD_VERSION +ARG DD_GIT_REPOSITORY_URL +ARG DD_GIT_COMMIT_SHA +ENV DD_GIT_REPOSITORY_URL=${DD_GIT_REPOSITORY_URL} +ENV DD_GIT_COMMIT_SHA=${DD_GIT_COMMIT_SHA} + EXPOSE 8080 ARG JAR_FILE=app-server/build/libs/app-server.jar