From 39014917444dd559b9fd9ce8f194ba580a33f0c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 21 Jun 2023 18:37:20 +0200 Subject: [PATCH] [cartservice] Update to .NET 7 (#942) * [cartservice] Update to .NET 7 * Add changelog entry * Avoid trimming application due https://github.com/open-telemetry/opentelemetry-dotnet/issues/4600 --- CHANGELOG.md | 2 ++ src/cartservice/src/Dockerfile | 6 +++--- src/cartservice/src/cartservice.csproj | 2 +- src/cartservice/tests/cartservice.tests.csproj | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8fc76de2a..e78d4b72e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,8 @@ release. ([#914](https://github.com/open-telemetry/opentelemetry-demo/pull/914)) * [cartservice] update .NET package to 1.5.0 release ([#935](https://github.com/open-telemetry/opentelemetry-demo/pull/935)) +* [cartservice] update service to .NET 7 + ([#942](https://github.com/open-telemetry/opentelemetry-demo/pull/942)) ## 1.4.0 diff --git a/src/cartservice/src/Dockerfile b/src/cartservice/src/Dockerfile index 7de4d12811..a711986268 100644 --- a/src/cartservice/src/Dockerfile +++ b/src/cartservice/src/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # https://mcr.microsoft.com/v2/dotnet/sdk/tags/list -FROM mcr.microsoft.com/dotnet/sdk:6.0.408 AS builder +FROM mcr.microsoft.com/dotnet/sdk:7.0.304 AS builder WORKDIR /usr/src/app/ @@ -26,12 +26,12 @@ RUN \ RUNTIME_IDENTIIFER=linux-musl-x64; \ if [ "$(uname -m)" = "aarch64" ]; then RUNTIME_IDENTIIFER=linux-musl-arm64; fi; \ dotnet restore ./src/cartservice.csproj -r $RUNTIME_IDENTIIFER && \ - dotnet publish ./src/cartservice.csproj -p:PublishSingleFile=true -r $RUNTIME_IDENTIIFER --self-contained true -p:PublishTrimmed=True -p:TrimMode=Link -c Release -o /cartservice --no-restore + dotnet publish ./src/cartservice.csproj -p:PublishSingleFile=true -r $RUNTIME_IDENTIIFER --self-contained true -p:PublishTrimmed=False -p:TrimMode=Link -c Release -o /cartservice --no-restore # ----------------------------------------------------------------------------- # https://mcr.microsoft.com/v2/dotnet/runtime-deps/tags/list -FROM mcr.microsoft.com/dotnet/runtime-deps:6.0.16-alpine3.17 +FROM mcr.microsoft.com/dotnet/runtime-deps:7.0.7-alpine3.17 WORKDIR /usr/src/app/ COPY --from=builder /cartservice/ ./ diff --git a/src/cartservice/src/cartservice.csproj b/src/cartservice/src/cartservice.csproj index 7350ad9644..2f6c8c7f5e 100644 --- a/src/cartservice/src/cartservice.csproj +++ b/src/cartservice/src/cartservice.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 diff --git a/src/cartservice/tests/cartservice.tests.csproj b/src/cartservice/tests/cartservice.tests.csproj index d3ace53272..7cc3a6f3e3 100644 --- a/src/cartservice/tests/cartservice.tests.csproj +++ b/src/cartservice/tests/cartservice.tests.csproj @@ -1,12 +1,12 @@ - net6.0 + net7.0 - +