From 8f48390cc74fd9b332c18f7d3f85633fbd0fbe2d Mon Sep 17 00:00:00 2001 From: Italo AGUIAR Date: Fri, 3 May 2024 15:12:28 +0200 Subject: [PATCH] feat: updating extension to support .net8 --- .github/workflows/build.yml | 2 +- .../ArmoniK.DevelopmentKit.Common.Tests.csproj | 2 +- .../ArmoniK.EndToEndTests.Client.csproj | 2 +- .../ArmoniK.EndToEndTests.Worker.csproj | 2 +- .../ArmoniK.EndToEndTests.Worker/Dockerfile | 4 ++-- Tests/endToEndTests.sh | 2 +- .../Common/ArmoniK.DevelopmentKit.Worker.Common.csproj | 4 ++-- .../ArmoniK.DevelopmentKit.Worker.DLLWorker.csproj | 2 +- Worker/src/DLLWorker/Dockerfile | 8 ++++---- .../ArmoniK.DevelopmentKit.Worker.Symphony.csproj | 2 +- .../Unified/ArmoniK.DevelopmentKit.Worker.Unified.csproj | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91bd177f..e68eda45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -220,7 +220,7 @@ jobs: if [ "${{ matrix.mtls }}" = "true" ]; then export Grpc__ClientP12="${{ steps.deploy.outputs.generated-folder }}/certificates/ingress/client.submitter.p12" fi - dotnet test --runtime linux-x64 -f net6.0 --logger "trx;LogFileName=test-results.trx" + dotnet test --runtime linux-x64 -f net8.0 --logger "trx;LogFileName=test-results.trx" - name: Test Report uses: dorny/test-reporter@v1 diff --git a/Tests/ArmoniK.DevelopmentKit.Common.Tests/ArmoniK.DevelopmentKit.Common.Tests.csproj b/Tests/ArmoniK.DevelopmentKit.Common.Tests/ArmoniK.DevelopmentKit.Common.Tests.csproj index 28c922d9..1173a445 100644 --- a/Tests/ArmoniK.DevelopmentKit.Common.Tests/ArmoniK.DevelopmentKit.Common.Tests.csproj +++ b/Tests/ArmoniK.DevelopmentKit.Common.Tests/ArmoniK.DevelopmentKit.Common.Tests.csproj @@ -1,7 +1,7 @@ - net472;net6.0 + net472;net8.0 enable false diff --git a/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Client/ArmoniK.EndToEndTests.Client.csproj b/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Client/ArmoniK.EndToEndTests.Client.csproj index 0bfd2cc9..c06ff074 100644 --- a/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Client/ArmoniK.EndToEndTests.Client.csproj +++ b/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Client/ArmoniK.EndToEndTests.Client.csproj @@ -1,7 +1,7 @@ - net472;net6.0 + net472;net8.0 1.0.0-700 true diff --git a/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Worker/ArmoniK.EndToEndTests.Worker.csproj b/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Worker/ArmoniK.EndToEndTests.Worker.csproj index 3c02b4ac..daa85bcb 100644 --- a/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Worker/ArmoniK.EndToEndTests.Worker.csproj +++ b/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Worker/ArmoniK.EndToEndTests.Worker.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 1.0.0-700 diff --git a/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Worker/Dockerfile b/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Worker/Dockerfile index 38d41eb5..f62d9088 100644 --- a/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Worker/Dockerfile +++ b/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Worker/Dockerfile @@ -1,13 +1,13 @@ ARG WORKER_DLL_IMAGE=dockerhubaneo/armonik_worker_dll:0.14.5 -FROM mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build WORKDIR /src COPY . . WORKDIR "/src/Tests/ArmoniK.EndToEndTests/ArmoniK.EndToEndTests.Worker" -RUN dotnet publish --self-contained -c Release -r linux-x64 -f net6.0 . +RUN dotnet publish --self-contained -c Release -r linux-x64 -f net8.0 . FROM ${WORKER_DLL_IMAGE} AS final diff --git a/Tests/endToEndTests.sh b/Tests/endToEndTests.sh index 25a08008..7df425a4 100755 --- a/Tests/endToEndTests.sh +++ b/Tests/endToEndTests.sh @@ -5,7 +5,7 @@ export MODE="All" export SERVER_NFS_IP="" export STORAGE_TYPE="HostPath" configuration="Release" -FRAMEWORK=net6.0 +FRAMEWORK=net8.0 OUTPUT_JSON="nofile" TO_BUCKET=false PACKAGE_NAME="ArmoniK.EndToEndTests.Worker-v1.0.0-700.zip" diff --git a/Worker/src/Common/ArmoniK.DevelopmentKit.Worker.Common.csproj b/Worker/src/Common/ArmoniK.DevelopmentKit.Worker.Common.csproj index 88a9afe7..b02ba907 100644 --- a/Worker/src/Common/ArmoniK.DevelopmentKit.Worker.Common.csproj +++ b/Worker/src/Common/ArmoniK.DevelopmentKit.Worker.Common.csproj @@ -1,7 +1,7 @@ - + - net6.0 + net8.0 Library True true diff --git a/Worker/src/DLLWorker/ArmoniK.DevelopmentKit.Worker.DLLWorker.csproj b/Worker/src/DLLWorker/ArmoniK.DevelopmentKit.Worker.DLLWorker.csproj index f7eb987a..11a7bdcf 100644 --- a/Worker/src/DLLWorker/ArmoniK.DevelopmentKit.Worker.DLLWorker.csproj +++ b/Worker/src/DLLWorker/ArmoniK.DevelopmentKit.Worker.DLLWorker.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 True true diff --git a/Worker/src/DLLWorker/Dockerfile b/Worker/src/DLLWorker/Dockerfile index 6e00c54b..6c35b33b 100644 --- a/Worker/src/DLLWorker/Dockerfile +++ b/Worker/src/DLLWorker/Dockerfile @@ -1,11 +1,11 @@ #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:6.0-bookworm-slim AS base +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS base WORKDIR /app ARG TARGETARCH -FROM mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["Worker/src/DLLWorker/ArmoniK.DevelopmentKit.Worker.DLLWorker.csproj", "Worker/src/DLLWorker/"] COPY ["Common/src/Common/ArmoniK.DevelopmentKit.Common.csproj", "Common/src/Common/"] @@ -15,7 +15,7 @@ RUN dotnet restore "Worker/src/DLLWorker/ArmoniK.DevelopmentKit.Worker.DLLWorker COPY . . WORKDIR "/src/Worker/src/DLLWorker" ARG BUILD_CONFIG=Release -RUN dotnet build "ArmoniK.DevelopmentKit.Worker.DLLWorker.csproj" -c "${BUILD_CONFIG}" -f net6.0 -o /app/build +RUN dotnet build "ArmoniK.DevelopmentKit.Worker.DLLWorker.csproj" -c "${BUILD_CONFIG}" -f net8.0 -o /app/build FROM build AS publish ARG BUILD_CONFIG=Release @@ -29,7 +29,7 @@ RUN case "$TARGETARCH" in \ esac ;; \ *) exit 1 ;; \ esac ; \ - dotnet publish "ArmoniK.DevelopmentKit.Worker.DLLWorker.csproj" -c "${BUILD_CONFIG}" -f net6.0 -o /app/publish -r "${DOTNET_ARCH}" --self-contained true + dotnet publish "ArmoniK.DevelopmentKit.Worker.DLLWorker.csproj" -c "${BUILD_CONFIG}" -f net8.0 -o /app/publish -r "${DOTNET_ARCH}" --self-contained true FROM base AS final diff --git a/Worker/src/Symphony/ArmoniK.DevelopmentKit.Worker.Symphony.csproj b/Worker/src/Symphony/ArmoniK.DevelopmentKit.Worker.Symphony.csproj index 76af5520..bf8135dc 100644 --- a/Worker/src/Symphony/ArmoniK.DevelopmentKit.Worker.Symphony.csproj +++ b/Worker/src/Symphony/ArmoniK.DevelopmentKit.Worker.Symphony.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 Library True true diff --git a/Worker/src/Unified/ArmoniK.DevelopmentKit.Worker.Unified.csproj b/Worker/src/Unified/ArmoniK.DevelopmentKit.Worker.Unified.csproj index c19395bf..a055e98d 100644 --- a/Worker/src/Unified/ArmoniK.DevelopmentKit.Worker.Unified.csproj +++ b/Worker/src/Unified/ArmoniK.DevelopmentKit.Worker.Unified.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 Library True true