From 262afe68fb5583d65ab3254e9281d60b6275d244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Thu, 4 Jan 2024 00:15:12 +0100 Subject: [PATCH 1/4] feat: use .Net8.0 --- .docs/content/1.concepts/7.plugins.md | 2 +- .../Amqp/src/ArmoniK.Core.Adapters.Amqp.csproj | 4 ++-- .../ArmoniK.Core.Adapters.Amqp.Tests.csproj | 4 ++-- .../ArmoniK.Core.Adapters.LocalStorage.csproj | 2 +- ...moniK.Core.Adapters.LocalStorage.Tests.csproj | 4 ++-- .../src/ArmoniK.Core.Adapters.Memory.csproj | 2 +- .../ArmoniK.Core.Adapters.Memory.Tests.csproj | 4 ++-- .../src/ArmoniK.Core.Adapters.MongoDB.csproj | 2 +- .../ArmoniK.Core.Adapters.MongoDB.Tests.csproj | 4 ++-- .../src/ArmoniK.Core.Adapters.QueueCommon.csproj | 2 +- .../src/ArmoniK.Core.Adapters.RabbitMQ.csproj | 4 ++-- .../ArmoniK.Core.Adapters.RabbitMQ.Tests.csproj | 4 ++-- .../Redis/src/ArmoniK.Core.Adapters.Redis.csproj | 2 +- .../ArmoniK.Core.Adapters.Redis.Tests.csproj | 4 ++-- Adaptors/S3/src/ArmoniK.Core.Adapters.S3.csproj | 2 +- .../tests/ArmoniK.Core.Adapters.S3.Tests.csproj | 4 ++-- Base/src/ArmoniK.Core.Base.csproj | 6 +++--- Common/src/ArmoniK.Core.Common.csproj | 16 ++++++++-------- .../tests/AdapterLoading/AdapterLoadingTest.cs | 4 ++-- Common/tests/ArmoniK.Core.Common.Tests.csproj | 6 +++--- .../src/ArmoniK.Core.Compute.PollingAgent.csproj | 2 +- .../src/ArmoniK.Core.Control.Metrics.csproj | 2 +- .../ArmoniK.Core.Control.PartitionMetrics.csproj | 2 +- .../src/ArmoniK.Core.Control.Submitter.csproj | 2 +- .../ArmoniK.Core.Control.Submitter.Tests.csproj | 4 ++-- Dockerfile | 4 ++-- .../src/ArmoniK.Core.ProfilingTools.csproj | 4 ++-- .../src/ArmoniK.Samples.Bench.Client.csproj | 14 +++++++------- Tests/Bench/Client/src/Dockerfile | 4 ++-- .../src/ArmoniK.Samples.Bench.Server.csproj | 2 +- Tests/Bench/Server/src/Dockerfile | 4 ++-- .../src/ArmoniK.Core.Common.Tests.Client.csproj | 6 +++--- .../src/ArmoniK.Samples.HtcMock.Client.csproj | 14 +++++++------- Tests/HtcMock/Client/src/Dockerfile | 4 ++-- .../src/ArmoniK.Samples.HtcMock.Server.csproj | 2 +- Tests/HtcMock/Server/src/Dockerfile | 4 ++-- ...ions.Common.StreamWrapper.Tests.Client.csproj | 6 +++--- Tests/Stream/Client/Dockerfile | 2 +- ...ions.Common.StreamWrapper.Tests.Common.csproj | 2 +- ...ions.Common.StreamWrapper.Tests.Server.csproj | 2 +- Tests/Stream/Server/Dockerfile | 4 ++-- Utils/src/ArmoniK.Core.Utils.csproj | 12 ++++++------ 42 files changed, 92 insertions(+), 92 deletions(-) diff --git a/.docs/content/1.concepts/7.plugins.md b/.docs/content/1.concepts/7.plugins.md index 3788870fe..cb801c260 100644 --- a/.docs/content/1.concepts/7.plugins.md +++ b/.docs/content/1.concepts/7.plugins.md @@ -23,7 +23,7 @@ This is an example of docker file that allows you to build a new image consistin ```dockerfile -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS mypluginimage +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS mypluginimage WORKDIR /src COPY . . WORKDIR "/src/MyPlugin/" diff --git a/Adaptors/Amqp/src/ArmoniK.Core.Adapters.Amqp.csproj b/Adaptors/Amqp/src/ArmoniK.Core.Adapters.Amqp.csproj index 963f1e809..5a8e9d3a0 100644 --- a/Adaptors/Amqp/src/ArmoniK.Core.Adapters.Amqp.csproj +++ b/Adaptors/Amqp/src/ArmoniK.Core.Adapters.Amqp.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 ANEO Copyright (C) ANEO, 2021-2021 AGPL-3.0-or-later @@ -26,7 +26,7 @@ - + false runtime diff --git a/Adaptors/Amqp/tests/ArmoniK.Core.Adapters.Amqp.Tests.csproj b/Adaptors/Amqp/tests/ArmoniK.Core.Adapters.Amqp.Tests.csproj index 1f216e23b..1693debda 100644 --- a/Adaptors/Amqp/tests/ArmoniK.Core.Adapters.Amqp.Tests.csproj +++ b/Adaptors/Amqp/tests/ArmoniK.Core.Adapters.Amqp.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false enable @@ -15,7 +15,7 @@ - + diff --git a/Adaptors/LocalStorage/src/ArmoniK.Core.Adapters.LocalStorage.csproj b/Adaptors/LocalStorage/src/ArmoniK.Core.Adapters.LocalStorage.csproj index 47e67bc85..c062f429a 100644 --- a/Adaptors/LocalStorage/src/ArmoniK.Core.Adapters.LocalStorage.csproj +++ b/Adaptors/LocalStorage/src/ArmoniK.Core.Adapters.LocalStorage.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2022 diff --git a/Adaptors/LocalStorage/tests/ArmoniK.Core.Adapters.LocalStorage.Tests.csproj b/Adaptors/LocalStorage/tests/ArmoniK.Core.Adapters.LocalStorage.Tests.csproj index 61f5bc48f..1cea6d459 100644 --- a/Adaptors/LocalStorage/tests/ArmoniK.Core.Adapters.LocalStorage.Tests.csproj +++ b/Adaptors/LocalStorage/tests/ArmoniK.Core.Adapters.LocalStorage.Tests.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 false enable @@ -8,7 +8,7 @@ - + diff --git a/Adaptors/Memory/src/ArmoniK.Core.Adapters.Memory.csproj b/Adaptors/Memory/src/ArmoniK.Core.Adapters.Memory.csproj index 0e1ac6eef..411855df2 100644 --- a/Adaptors/Memory/src/ArmoniK.Core.Adapters.Memory.csproj +++ b/Adaptors/Memory/src/ArmoniK.Core.Adapters.Memory.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2021 diff --git a/Adaptors/Memory/tests/ArmoniK.Core.Adapters.Memory.Tests.csproj b/Adaptors/Memory/tests/ArmoniK.Core.Adapters.Memory.Tests.csproj index 93b752a0b..0a4e710ae 100644 --- a/Adaptors/Memory/tests/ArmoniK.Core.Adapters.Memory.Tests.csproj +++ b/Adaptors/Memory/tests/ArmoniK.Core.Adapters.Memory.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false enable @@ -15,7 +15,7 @@ - + diff --git a/Adaptors/MongoDB/src/ArmoniK.Core.Adapters.MongoDB.csproj b/Adaptors/MongoDB/src/ArmoniK.Core.Adapters.MongoDB.csproj index d16624813..c52a739db 100644 --- a/Adaptors/MongoDB/src/ArmoniK.Core.Adapters.MongoDB.csproj +++ b/Adaptors/MongoDB/src/ArmoniK.Core.Adapters.MongoDB.csproj @@ -2,7 +2,7 @@ - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2021 diff --git a/Adaptors/MongoDB/tests/ArmoniK.Core.Adapters.MongoDB.Tests.csproj b/Adaptors/MongoDB/tests/ArmoniK.Core.Adapters.MongoDB.Tests.csproj index 1cfb5a750..205092c5f 100644 --- a/Adaptors/MongoDB/tests/ArmoniK.Core.Adapters.MongoDB.Tests.csproj +++ b/Adaptors/MongoDB/tests/ArmoniK.Core.Adapters.MongoDB.Tests.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 false enable @@ -8,7 +8,7 @@ - + diff --git a/Adaptors/QueueCommon/src/ArmoniK.Core.Adapters.QueueCommon.csproj b/Adaptors/QueueCommon/src/ArmoniK.Core.Adapters.QueueCommon.csproj index 5488b6dfd..953a3ba92 100644 --- a/Adaptors/QueueCommon/src/ArmoniK.Core.Adapters.QueueCommon.csproj +++ b/Adaptors/QueueCommon/src/ArmoniK.Core.Adapters.QueueCommon.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2021 diff --git a/Adaptors/RabbitMQ/src/ArmoniK.Core.Adapters.RabbitMQ.csproj b/Adaptors/RabbitMQ/src/ArmoniK.Core.Adapters.RabbitMQ.csproj index 8898a321a..eb3a92fbb 100644 --- a/Adaptors/RabbitMQ/src/ArmoniK.Core.Adapters.RabbitMQ.csproj +++ b/Adaptors/RabbitMQ/src/ArmoniK.Core.Adapters.RabbitMQ.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2021 @@ -27,7 +27,7 @@ - + false runtime diff --git a/Adaptors/RabbitMQ/tests/ArmoniK.Core.Adapters.RabbitMQ.Tests.csproj b/Adaptors/RabbitMQ/tests/ArmoniK.Core.Adapters.RabbitMQ.Tests.csproj index da703a30a..91cd4ab9d 100644 --- a/Adaptors/RabbitMQ/tests/ArmoniK.Core.Adapters.RabbitMQ.Tests.csproj +++ b/Adaptors/RabbitMQ/tests/ArmoniK.Core.Adapters.RabbitMQ.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false enable @@ -15,7 +15,7 @@ - + diff --git a/Adaptors/Redis/src/ArmoniK.Core.Adapters.Redis.csproj b/Adaptors/Redis/src/ArmoniK.Core.Adapters.Redis.csproj index 3999c2b61..ff95c6afc 100644 --- a/Adaptors/Redis/src/ArmoniK.Core.Adapters.Redis.csproj +++ b/Adaptors/Redis/src/ArmoniK.Core.Adapters.Redis.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2022 diff --git a/Adaptors/Redis/tests/ArmoniK.Core.Adapters.Redis.Tests.csproj b/Adaptors/Redis/tests/ArmoniK.Core.Adapters.Redis.Tests.csproj index 1edc2b86d..d6c5af314 100644 --- a/Adaptors/Redis/tests/ArmoniK.Core.Adapters.Redis.Tests.csproj +++ b/Adaptors/Redis/tests/ArmoniK.Core.Adapters.Redis.Tests.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 false enable @@ -8,7 +8,7 @@ - + diff --git a/Adaptors/S3/src/ArmoniK.Core.Adapters.S3.csproj b/Adaptors/S3/src/ArmoniK.Core.Adapters.S3.csproj index d386b88f7..25a1b8d79 100644 --- a/Adaptors/S3/src/ArmoniK.Core.Adapters.S3.csproj +++ b/Adaptors/S3/src/ArmoniK.Core.Adapters.S3.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable diff --git a/Adaptors/S3/tests/ArmoniK.Core.Adapters.S3.Tests.csproj b/Adaptors/S3/tests/ArmoniK.Core.Adapters.S3.Tests.csproj index 587f8cec1..00ba3b4f5 100644 --- a/Adaptors/S3/tests/ArmoniK.Core.Adapters.S3.Tests.csproj +++ b/Adaptors/S3/tests/ArmoniK.Core.Adapters.S3.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable @@ -9,7 +9,7 @@ - + diff --git a/Base/src/ArmoniK.Core.Base.csproj b/Base/src/ArmoniK.Core.Base.csproj index 5223055e0..85a18087c 100644 --- a/Base/src/ArmoniK.Core.Base.csproj +++ b/Base/src/ArmoniK.Core.Base.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2021 @@ -27,8 +27,8 @@ - - + + diff --git a/Common/src/ArmoniK.Core.Common.csproj b/Common/src/ArmoniK.Core.Common.csproj index 824b7d60d..e0bbeda7a 100644 --- a/Common/src/ArmoniK.Core.Common.csproj +++ b/Common/src/ArmoniK.Core.Common.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2021 @@ -27,17 +27,17 @@ - + - + - - - - - + + + + + diff --git a/Common/tests/AdapterLoading/AdapterLoadingTest.cs b/Common/tests/AdapterLoading/AdapterLoadingTest.cs index c93d32b75..87e60586b 100644 --- a/Common/tests/AdapterLoading/AdapterLoadingTest.cs +++ b/Common/tests/AdapterLoading/AdapterLoadingTest.cs @@ -41,10 +41,10 @@ public class AdapterLoadingTest string.Empty)); private static readonly string AmqpPath = - $"{Path.DirectorySeparatorChar}Adaptors{Path.DirectorySeparatorChar}Amqp{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}bin{Path.DirectorySeparatorChar}Debug{Path.DirectorySeparatorChar}net6.0{Path.DirectorySeparatorChar}ArmoniK.Core.Adapters.Amqp.dll"; + $"{Path.DirectorySeparatorChar}Adaptors{Path.DirectorySeparatorChar}Amqp{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}bin{Path.DirectorySeparatorChar}Debug{Path.DirectorySeparatorChar}net8.0{Path.DirectorySeparatorChar}ArmoniK.Core.Adapters.Amqp.dll"; private static readonly string RabbitPath = - $"{Path.DirectorySeparatorChar}Adaptors{Path.DirectorySeparatorChar}RabbitMQ{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}bin{Path.DirectorySeparatorChar}Debug{Path.DirectorySeparatorChar}net6.0{Path.DirectorySeparatorChar}ArmoniK.Core.Adapters.RabbitMQ.dll"; + $"{Path.DirectorySeparatorChar}Adaptors{Path.DirectorySeparatorChar}RabbitMQ{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}bin{Path.DirectorySeparatorChar}Debug{Path.DirectorySeparatorChar}net8.0{Path.DirectorySeparatorChar}ArmoniK.Core.Adapters.RabbitMQ.dll"; public static IEnumerable TestCasesQueueLocation diff --git a/Common/tests/ArmoniK.Core.Common.Tests.csproj b/Common/tests/ArmoniK.Core.Common.Tests.csproj index 819bd138e..71abab52a 100644 --- a/Common/tests/ArmoniK.Core.Common.Tests.csproj +++ b/Common/tests/ArmoniK.Core.Common.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false enable @@ -14,12 +14,12 @@ - + - + diff --git a/Compute/PollingAgent/src/ArmoniK.Core.Compute.PollingAgent.csproj b/Compute/PollingAgent/src/ArmoniK.Core.Compute.PollingAgent.csproj index bca75701d..13980a47a 100644 --- a/Compute/PollingAgent/src/ArmoniK.Core.Compute.PollingAgent.csproj +++ b/Compute/PollingAgent/src/ArmoniK.Core.Compute.PollingAgent.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 ANEO Copyright (C) ANEO, 2021-2021 diff --git a/Control/Metrics/src/ArmoniK.Core.Control.Metrics.csproj b/Control/Metrics/src/ArmoniK.Core.Control.Metrics.csproj index 316d0c1b1..d36af1134 100644 --- a/Control/Metrics/src/ArmoniK.Core.Control.Metrics.csproj +++ b/Control/Metrics/src/ArmoniK.Core.Control.Metrics.csproj @@ -2,7 +2,7 @@ - net6.0 + net8.0 ANEO Copyright (C) ANEO, 2021-2021 AGPL-3.0-or-later diff --git a/Control/PartitionMetrics/src/ArmoniK.Core.Control.PartitionMetrics.csproj b/Control/PartitionMetrics/src/ArmoniK.Core.Control.PartitionMetrics.csproj index 031fa22d3..42fa28aad 100644 --- a/Control/PartitionMetrics/src/ArmoniK.Core.Control.PartitionMetrics.csproj +++ b/Control/PartitionMetrics/src/ArmoniK.Core.Control.PartitionMetrics.csproj @@ -2,7 +2,7 @@ - net6.0 + net8.0 ANEO Copyright (C) ANEO, 2021-2021 AGPL-3.0-or-later diff --git a/Control/Submitter/src/ArmoniK.Core.Control.Submitter.csproj b/Control/Submitter/src/ArmoniK.Core.Control.Submitter.csproj index e4b5c3918..780deb8b6 100644 --- a/Control/Submitter/src/ArmoniK.Core.Control.Submitter.csproj +++ b/Control/Submitter/src/ArmoniK.Core.Control.Submitter.csproj @@ -2,7 +2,7 @@ - net6.0 + net8.0 ANEO Copyright (C) ANEO, 2021-2021 AGPL-3.0-or-later diff --git a/Control/Submitter/tests/ArmoniK.Core.Control.Submitter.Tests.csproj b/Control/Submitter/tests/ArmoniK.Core.Control.Submitter.Tests.csproj index ed28d0f10..be6e714fd 100644 --- a/Control/Submitter/tests/ArmoniK.Core.Control.Submitter.Tests.csproj +++ b/Control/Submitter/tests/ArmoniK.Core.Control.Submitter.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false enable @@ -14,7 +14,7 @@ - + diff --git a/Dockerfile b/Dockerfile index e9f0ef34a..49d2abf0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0 as base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 as base RUN groupadd --gid 5000 armonikuser && useradd --home-dir /home/armonikuser --create-home --uid 5000 --gid 5000 --shell /bin/sh --skel /dev/null armonikuser -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG VERSION=1.0.0.0 WORKDIR /src diff --git a/ProfilingTools/src/ArmoniK.Core.ProfilingTools.csproj b/ProfilingTools/src/ArmoniK.Core.ProfilingTools.csproj index 82c81928e..2c01dd2fc 100644 --- a/ProfilingTools/src/ArmoniK.Core.ProfilingTools.csproj +++ b/ProfilingTools/src/ArmoniK.Core.ProfilingTools.csproj @@ -2,7 +2,7 @@ - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2021 @@ -27,7 +27,7 @@ - + diff --git a/Tests/Bench/Client/src/ArmoniK.Samples.Bench.Client.csproj b/Tests/Bench/Client/src/ArmoniK.Samples.Bench.Client.csproj index 5bd274b31..1e8fe4fb6 100644 --- a/Tests/Bench/Client/src/ArmoniK.Samples.Bench.Client.csproj +++ b/Tests/Bench/Client/src/ArmoniK.Samples.Bench.Client.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 true ANEO Copyright (C) ANEO, 2021-2021 @@ -25,12 +25,12 @@ - - - - - - + + + + + + diff --git a/Tests/Bench/Client/src/Dockerfile b/Tests/Bench/Client/src/Dockerfile index 2edf70965..b695de258 100644 --- a/Tests/Bench/Client/src/Dockerfile +++ b/Tests/Bench/Client/src/Dockerfile @@ -1,9 +1,9 @@ #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 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["Tests/Bench/Client/src/ArmoniK.Samples.Bench.Client.csproj", "Tests/Bench/Client/src/"] COPY ["Tests/Common/Client/src/ArmoniK.Core.Common.Tests.Client.csproj", "Tests/Common/Client/src/"] diff --git a/Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj b/Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj index 692731711..38fa76010 100644 --- a/Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj +++ b/Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 ANEO Copyright (C) ANEO, 2021-2021 AGPL-3.0-or-later diff --git a/Tests/Bench/Server/src/Dockerfile b/Tests/Bench/Server/src/Dockerfile index f86d12e0a..21b3cfeec 100644 --- a/Tests/Bench/Server/src/Dockerfile +++ b/Tests/Bench/Server/src/Dockerfile @@ -1,9 +1,9 @@ #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 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj", "Tests/Bench/Server/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] diff --git a/Tests/Common/Client/src/ArmoniK.Core.Common.Tests.Client.csproj b/Tests/Common/Client/src/ArmoniK.Core.Common.Tests.Client.csproj index c8f2bfdb3..0289e0ba0 100644 --- a/Tests/Common/Client/src/ArmoniK.Core.Common.Tests.Client.csproj +++ b/Tests/Common/Client/src/ArmoniK.Core.Common.Tests.Client.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2021 @@ -26,8 +26,8 @@ - - + + diff --git a/Tests/HtcMock/Client/src/ArmoniK.Samples.HtcMock.Client.csproj b/Tests/HtcMock/Client/src/ArmoniK.Samples.HtcMock.Client.csproj index 89d86ad5e..14d493c6f 100644 --- a/Tests/HtcMock/Client/src/ArmoniK.Samples.HtcMock.Client.csproj +++ b/Tests/HtcMock/Client/src/ArmoniK.Samples.HtcMock.Client.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 true ANEO Copyright (C) ANEO, 2021-2021 @@ -25,12 +25,12 @@ - - - - - - + + + + + + diff --git a/Tests/HtcMock/Client/src/Dockerfile b/Tests/HtcMock/Client/src/Dockerfile index c243197ee..7f35ccfda 100644 --- a/Tests/HtcMock/Client/src/Dockerfile +++ b/Tests/HtcMock/Client/src/Dockerfile @@ -1,9 +1,9 @@ #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 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["Tests/HtcMock/Client/src/ArmoniK.Samples.HtcMock.Client.csproj", "Tests/HtcMock/Client/src/"] COPY ["Tests/Common/Client/src/ArmoniK.Core.Common.Tests.Client.csproj", "Tests/Common/Client/src/"] diff --git a/Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj b/Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj index 6e256fa95..14fa75a5d 100644 --- a/Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj +++ b/Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 ANEO Copyright (C) ANEO, 2021-2021 AGPL-3.0-or-later diff --git a/Tests/HtcMock/Server/src/Dockerfile b/Tests/HtcMock/Server/src/Dockerfile index fc4910dda..676ced649 100644 --- a/Tests/HtcMock/Server/src/Dockerfile +++ b/Tests/HtcMock/Server/src/Dockerfile @@ -1,9 +1,9 @@ #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 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj", "Tests/HtcMock/Server/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] diff --git a/Tests/Stream/Client/ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj b/Tests/Stream/Client/ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj index 848164c6d..518b741c1 100644 --- a/Tests/Stream/Client/ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj +++ b/Tests/Stream/Client/ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 true ANEO Copyright (C) ANEO, 2021-2021 @@ -26,8 +26,8 @@ - - + + diff --git a/Tests/Stream/Client/Dockerfile b/Tests/Stream/Client/Dockerfile index b060d2abe..8962be78b 100644 --- a/Tests/Stream/Client/Dockerfile +++ b/Tests/Stream/Client/Dockerfile @@ -1,6 +1,6 @@ #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/sdk:6.0 AS base +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS base FROM base AS build WORKDIR /src diff --git a/Tests/Stream/Common/ArmoniK.Extensions.Common.StreamWrapper.Tests.Common.csproj b/Tests/Stream/Common/ArmoniK.Extensions.Common.StreamWrapper.Tests.Common.csproj index 27f702b83..e1d21aaf6 100644 --- a/Tests/Stream/Common/ArmoniK.Extensions.Common.StreamWrapper.Tests.Common.csproj +++ b/Tests/Stream/Common/ArmoniK.Extensions.Common.StreamWrapper.Tests.Common.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable diff --git a/Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj b/Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj index 5e6ce375b..c89f771b4 100644 --- a/Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj +++ b/Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 ANEO Copyright (C) ANEO, 2021-2021 AGPL-3.0-or-later diff --git a/Tests/Stream/Server/Dockerfile b/Tests/Stream/Server/Dockerfile index 651412d9e..3f9cbc8f6 100644 --- a/Tests/Stream/Server/Dockerfile +++ b/Tests/Stream/Server/Dockerfile @@ -1,12 +1,12 @@ #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 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app ENV ASPNETCORE_URLS http://+:1080;https://+1443 EXPOSE 1080 EXPOSE 1443 -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj", "Tests/Stream/Server/"] COPY ["Tests/Stream/Common/ArmoniK.Extensions.Common.StreamWrapper.Tests.Common.csproj", "Tests/Stream/Common/"] diff --git a/Utils/src/ArmoniK.Core.Utils.csproj b/Utils/src/ArmoniK.Core.Utils.csproj index c3d69ba50..c87440e82 100644 --- a/Utils/src/ArmoniK.Core.Utils.csproj +++ b/Utils/src/ArmoniK.Core.Utils.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 True ANEO Copyright (C) ANEO, 2021-2021 @@ -27,11 +27,11 @@ - - - - - + + + + + From 7e93376700f2e29e16c4975658433a38f13d21f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Thu, 4 Jan 2024 00:36:00 +0100 Subject: [PATCH 2/4] fix: dispose IDisposable objects in Partition Metrics Meter --- Control/PartitionMetrics/src/ArmoniKMeter.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Control/PartitionMetrics/src/ArmoniKMeter.cs b/Control/PartitionMetrics/src/ArmoniKMeter.cs index e8b706aa1..11b7ac673 100644 --- a/Control/PartitionMetrics/src/ArmoniKMeter.cs +++ b/Control/PartitionMetrics/src/ArmoniKMeter.cs @@ -36,7 +36,7 @@ namespace ArmoniK.Core.Control.PartitionMetrics; -public class ArmoniKMeter : Meter, IHostedService +public class ArmoniKMeter : Meter, IHostedService, IDisposable { private readonly HttpClient client_; private readonly IDictionary> gauges_; @@ -69,6 +69,12 @@ public ArmoniKMeter(IPartitionTable partitionTable, AddGauge(""); } + public void Dispose() + { + client_.Dispose(); + measurements_.Dispose(); + } + public async Task StartAsync(CancellationToken cancellationToken) // Call FetchMeasurementsAsync in order to populate gauges. => await measurements_.Call(FetchMeasurementsAsync, From 66ca2e75cb967d61a226c93a69d0a88a2b2ab86f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Fri, 5 Jan 2024 12:51:35 +0100 Subject: [PATCH 3/4] feat: arm images for dotnet 8 --- .github/workflows/build.yml | 193 +++------------------------- .github/workflows/make-release.yml | 81 +++--------- Dockerfile | 31 ++--- Tests/Bench/Client/src/Dockerfile | 15 +-- Tests/Bench/Server/src/Dockerfile | 15 +-- Tests/HtcMock/Client/src/Dockerfile | 15 +-- Tests/HtcMock/Server/src/Dockerfile | 15 +-- Tests/Stream/Client/Dockerfile | 10 +- Tests/Stream/Server/Dockerfile | 15 +-- justfile | 30 +++-- 10 files changed, 109 insertions(+), 311 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7305e5e2e..b44be866f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -207,44 +207,8 @@ jobs: - name: Push the package run: dotnet nuget push /tmp/packages/ArmoniK.Core.*.nupkg -k ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json - imagesCore: - runs-on: ubuntu-latest - needs: - - versionning - - buildProjects - env: - VERSION: ${{ needs.versionning.outputs.version }} - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - ref: ${{ github.ref }} - submodules: true - - - name: Setup just - run: | - sudo snap install --edge --classic just - - - name: login - run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_LOGIN }} --password-stdin - - name: Build - run: | - just tag=$VERSION build-core - - - name: push - run: | - while IFS= read -r IMG - do - docker push $IMG:${VERSION} - done <<-EOF - dockerhubaneo/armonik_control - dockerhubaneo/armonik_control_partition_metrics - dockerhubaneo/armonik_control_metrics - dockerhubaneo/armonik_pollingagent - EOF - - imagesRe: + images: runs-on: ubuntu-latest needs: - versionning @@ -254,149 +218,40 @@ jobs: strategy: fail-fast: true matrix: - include: - - img : dockerhubaneo/armonik_core_stream_test_worker - path: ./Tests/Stream/Server/Dockerfile - - img : dockerhubaneo/armonik_core_stream_test_client - path: ./Tests/Stream/Client/Dockerfile - - img : dockerhubaneo/armonik_core_htcmock_test_worker - path: ./Tests/HtcMock/Server/src/Dockerfile - - img : dockerhubaneo/armonik_core_htcmock_test_client - path: ./Tests/HtcMock/Client/src/Dockerfile - - img : dockerhubaneo/armonik_core_bench_test_worker - path: ./Tests/Bench/Server/src/Dockerfile - - img : dockerhubaneo/armonik_core_bench_test_client - path: ./Tests/Bench/Client/src/Dockerfile + type: + - build-core + - buildBenchClient + - worker=bench buildWorker + - buildStreamClient + - worker=stream buildWorker + - buildHtcmockClient + - worker=htcmock buildWorker steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: ref: ${{ github.ref }} - submodules: true - - name: login - run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_LOGIN }} --password-stdin - - - name: Build - run: docker build --build-arg VERSION=$VERSION -t ${{ matrix.img }}:$VERSION -f ${{ matrix.path }} . - - - name: push - run: docker push ${{ matrix.img }}:$VERSION - - imagesCoreC: - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - needs: - - versionning - - imagesCore - env: - VERSION: ${{ needs.versionning.outputs.version }} - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - ref: ${{ github.ref }} - submodules: true + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3 - name: Setup just run: | sudo snap install --edge --classic just - - name: Set up QEMU - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3 - - name: login - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3 - with: - username: ${{ secrets.DOCKER_HUB_LOGIN }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} + run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_LOGIN }} --password-stdin - name: Build - run: just tag=${VERSION}-arm builder=buildx build-core - - - name: Rename run: | - while IFS= read -r IMG - do - docker buildx imagetools create $IMG:${VERSION} --tag $IMG:${VERSION} --append $IMG:${VERSION}-arm - done <<-EOF - dockerhubaneo/armonik_control - dockerhubaneo/armonik_control_partition_metrics - dockerhubaneo/armonik_control_metrics - dockerhubaneo/armonik_pollingagent - EOF - - imagesReC: - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - needs: - - versionning - - imagesRe - env: - VERSION: ${{ needs.versionning.outputs.version }} - strategy: - fail-fast: false - matrix: - include: - - img : dockerhubaneo/armonik_core_stream_test_worker - path: ./Tests/Stream/Server/Dockerfile - - img : dockerhubaneo/armonik_core_stream_test_client - path: ./Tests/Stream/Client/Dockerfile - - img : dockerhubaneo/armonik_core_htcmock_test_worker - path: ./Tests/HtcMock/Server/src/Dockerfile - - img : dockerhubaneo/armonik_core_htcmock_test_client - path: ./Tests/HtcMock/Client/src/Dockerfile - - img : dockerhubaneo/armonik_core_bench_test_worker - path: ./Tests/Bench/Server/src/Dockerfile - - img : dockerhubaneo/armonik_core_bench_test_client - path: ./Tests/Bench/Client/src/Dockerfile - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - ref: ${{ github.ref }} - submodules: true + just tag=$VERSION platform=linux/arm64,linux/amd64 load=false push=true ${{ matrix.type }} - - name: Set up QEMU - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3 - - - name: login - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3 - with: - username: ${{ secrets.DOCKER_HUB_LOGIN }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - - - name: platforms - run: echo ${{ steps.buildx.outputs.platforms }} - - - name: Build and push - uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5 - with: - file: ${{ matrix.path }} - context: . - platforms: linux/arm64 - build-args: | - VERSION=${{ needs.versionning.outputs.version }} - push: true - tags: | - ${{ matrix.img }}:${{ needs.versionning.outputs.version }}-arm - - - name: Create multi-arch manifest - run: docker buildx imagetools create ${{ matrix.img }}:${VERSION} --tag ${{ matrix.img }}:${VERSION} --append ${{ matrix.img }}:${VERSION}-arm testStreamDC: needs: - versionning - - imagesCore - - imagesRe + - images env: VERSION: ${{ needs.versionning.outputs.version }} runs-on: ubuntu-latest @@ -481,8 +336,7 @@ jobs: testHtcMockDC: needs: - versionning - - imagesCore - - imagesRe + - images env: VERSION: ${{ needs.versionning.outputs.version }} runs-on: ubuntu-latest @@ -655,8 +509,7 @@ jobs: testConnectivity: needs: - versionning - - imagesCore - - imagesRe + - images env: VERSION: ${{ needs.versionning.outputs.version }} runs-on: ubuntu-latest @@ -739,8 +592,7 @@ jobs: runBench: needs: - versionning - - imagesCore - - imagesRe + - images env: VERSION: ${{ needs.versionning.outputs.version }} runs-on: ubuntu-latest @@ -848,8 +700,7 @@ jobs: defaultPartitionMock: needs: - versionning - - imagesCore - - imagesRe + - images env: VERSION: ${{ needs.versionning.outputs.version }} runs-on: ubuntu-latest @@ -921,8 +772,7 @@ jobs: healthCheckTest: needs: - versionning - - imagesCore - - imagesRe + - images env: VERSION: ${{ needs.versionning.outputs.version }} runs-on: ubuntu-latest @@ -1068,8 +918,7 @@ jobs: - testHtcMockDC - defaultPartitionMock - testStreamDC - - imagesCore - - imagesRe + - images - runBench - healthCheckTest - testConnectivity diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml index 54aee6163..1115359f6 100644 --- a/.github/workflows/make-release.yml +++ b/.github/workflows/make-release.yml @@ -62,91 +62,42 @@ jobs: run : git push origin -d ${{ github.ref_name }} - imagesCore: + images: runs-on: ubuntu-latest needs: - versionning env: VERSION: ${{ needs.versionning.outputs.release }} - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - ref: ${{ github.ref }} - submodules: true - - - name: Setup just - run: | - sudo snap install --edge --classic just - - - name: login - run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_LOGIN }} --password-stdin - - - name: Create builder - run: | - docker buildx create --use - - - name: Build - run: | - just tag=$VERSION builder=buildx platform="linux/arm64,linux/amd64" build-core - - - buildImages: - runs-on: ubuntu-latest - needs: - - versionning strategy: - fail-fast: false + fail-fast: true matrix: - include: - - img : dockerhubaneo/armonik_core_stream_test_worker - path: ./Tests/Stream/Server/Dockerfile - - img : dockerhubaneo/armonik_core_stream_test_client - path: ./Tests/Stream/Client/Dockerfile - - img : dockerhubaneo/armonik_core_htcmock_test_worker - path: ./Tests/HtcMock/Server/src/Dockerfile - - img : dockerhubaneo/armonik_core_htcmock_test_client - path: ./Tests/HtcMock/Client/src/Dockerfile - - img : dockerhubaneo/armonik_core_bench_test_worker - path: ./Tests/Bench/Server/src/Dockerfile - - img : dockerhubaneo/armonik_core_bench_test_client - path: ./Tests/Bench/Client/src/Dockerfile + type: + - build-core + - buildBenchClient + - worker=bench buildWorker + - buildStreamClient + - worker=stream buildWorker + - buildHtcmockClient + - worker=htcmock buildWorker steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: ref: ${{ github.ref }} - submodules: true - - - name: Set up QEMU - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3 - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3 + - name: Setup just + run: sudo snap install --edge --classic just + - name: login - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3 - with: - username: ${{ secrets.DOCKER_HUB_LOGIN }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} + run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_LOGIN }} --password-stdin - - name: platforms - run: echo ${{ steps.buildx.outputs.platforms }} + - name: Build + run: just tag=$VERSION platform=linux/arm64,linux/amd64 load=false push=true ${{ matrix.type }} - - name: Build and push - uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5 - with: - file: ${{ matrix.path }} - context: . - platforms: | - linux/arm64 - linux/amd64 - build-args: | - VERSION=${{ needs.versionning.outputs.release }} - push: true - tags: | - ${{ matrix.img }}:${{ needs.versionning.outputs.release }} publish-nuget: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index 49d2abf0e..40f074b85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0 as base RUN groupadd --gid 5000 armonikuser && useradd --home-dir /home/armonikuser --create-home --uid 5000 --gid 5000 --shell /bin/sh --skel /dev/null armonikuser -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG VERSION=1.0.0.0 +ARG TARGETARCH WORKDIR /src # git ls-tree -r HEAD --name-only --full-tree | grep "csproj$" | xargs -I % sh -c "export D=\$(dirname %) ; echo COPY [\\\"%\\\", \\\"\$D/\\\"]" @@ -22,10 +23,12 @@ COPY ["Control/PartitionMetrics/src/ArmoniK.Core.Control.PartitionMetrics.csproj COPY ["Control/Submitter/src/ArmoniK.Core.Control.Submitter.csproj", "Control/Submitter/src/"] COPY ["Utils/src/ArmoniK.Core.Utils.csproj", "Utils/src/"] -RUN dotnet restore "Compute/PollingAgent/src/ArmoniK.Core.Compute.PollingAgent.csproj" -RUN dotnet restore "Control/Metrics/src/ArmoniK.Core.Control.Metrics.csproj" -RUN dotnet restore "Control/PartitionMetrics/src/ArmoniK.Core.Control.PartitionMetrics.csproj" -RUN dotnet restore "Control/Submitter/src/ArmoniK.Core.Control.Submitter.csproj" +RUN dotnet restore -a $TARGETARCH "Compute/PollingAgent/src/ArmoniK.Core.Compute.PollingAgent.csproj" +RUN dotnet restore -a $TARGETARCH "Control/Metrics/src/ArmoniK.Core.Control.Metrics.csproj" +RUN dotnet restore -a $TARGETARCH "Control/PartitionMetrics/src/ArmoniK.Core.Control.PartitionMetrics.csproj" +RUN dotnet restore -a $TARGETARCH "Control/Submitter/src/ArmoniK.Core.Control.Submitter.csproj" +RUN dotnet restore -a $TARGETARCH "Adaptors/Amqp/src/ArmoniK.Core.Adapters.Amqp.csproj" +RUN dotnet restore -a $TARGETARCH "Adaptors/RabbitMQ/src/ArmoniK.Core.Adapters.RabbitMQ.csproj" # git ls-tree -r HEAD --name-only --full-tree | grep "csproj$" | xargs -I % sh -c "export D=\$(dirname %) ; echo COPY [\\\"\$D\\\", \\\"\$D\\\"]" COPY ["Adaptors/Amqp/src", "Adaptors/Amqp/src"] @@ -45,28 +48,22 @@ COPY ["Control/Submitter/src", "Control/Submitter/src"] COPY ["Utils/src", "Utils/src"] WORKDIR /src/Adaptors/Amqp/src -RUN dotnet build -c Release --no-restore "ArmoniK.Core.Adapters.Amqp.csproj" -p:RunAnalyzers=false -p:WarningLevel=0 -RUN dotnet publish "ArmoniK.Core.Adapters.Amqp.csproj" -c Release -o /app/publish/amqp /p:UseAppHost=false -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish "ArmoniK.Core.Adapters.Amqp.csproj" -a $TARGETARCH --no-restore -o /app/publish/amqp /p:UseAppHost=false -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION WORKDIR /src/Adaptors/RabbitMQ/src -RUN dotnet build -c Release --no-restore "ArmoniK.Core.Adapters.RabbitMQ.csproj" -p:RunAnalyzers=false -p:WarningLevel=0 -RUN dotnet publish "ArmoniK.Core.Adapters.RabbitMQ.csproj" -c Release -o /app/publish/rabbit /p:UseAppHost=false -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish "ArmoniK.Core.Adapters.RabbitMQ.csproj" -a $TARGETARCH --no-restore -o /app/publish/rabbit /p:UseAppHost=false -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION WORKDIR /src/Compute/PollingAgent/src -RUN dotnet build -c Release --no-restore "ArmoniK.Core.Compute.PollingAgent.csproj" -p:RunAnalyzers=false -p:WarningLevel=0 -RUN dotnet publish "ArmoniK.Core.Compute.PollingAgent.csproj" -c Release -o /app/publish/polling_agent /p:UseAppHost=false -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish "ArmoniK.Core.Compute.PollingAgent.csproj" -a $TARGETARCH --no-restore -o /app/publish/polling_agent /p:UseAppHost=false -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION WORKDIR /src/Control/Metrics/src -RUN dotnet build -c Release --no-restore "ArmoniK.Core.Control.Metrics.csproj" -p:RunAnalyzers=false -p:WarningLevel=0 -RUN dotnet publish "ArmoniK.Core.Control.Metrics.csproj" -c Release -o /app/publish/metrics /p:UseAppHost=false -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish "ArmoniK.Core.Control.Metrics.csproj" -a $TARGETARCH --no-restore -o /app/publish/metrics /p:UseAppHost=false -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION WORKDIR /src/Control/PartitionMetrics/src -RUN dotnet build -c Release --no-restore "ArmoniK.Core.Control.PartitionMetrics.csproj" -p:RunAnalyzers=false -p:WarningLevel=0 -RUN dotnet publish "ArmoniK.Core.Control.PartitionMetrics.csproj" -c Release -o /app/publish/partition_metrics /p:UseAppHost=false -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish "ArmoniK.Core.Control.PartitionMetrics.csproj" -a $TARGETARCH --no-restore -o /app/publish/partition_metrics /p:UseAppHost=false -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION WORKDIR /src/Control/Submitter/src -RUN dotnet build -c Release --no-restore "ArmoniK.Core.Control.Submitter.csproj" -p:RunAnalyzers=false -p:WarningLevel=0 -RUN dotnet publish "ArmoniK.Core.Control.Submitter.csproj" -c Release -o /app/publish/submitter /p:UseAppHost=false -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish "ArmoniK.Core.Control.Submitter.csproj" -a $TARGETARCH --no-restore -o /app/publish/submitter /p:UseAppHost=false -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION FROM base as polling_agent WORKDIR /adapters/queue/amqp diff --git a/Tests/Bench/Client/src/Dockerfile b/Tests/Bench/Client/src/Dockerfile index b695de258..1b6bfd0d6 100644 --- a/Tests/Bench/Client/src/Dockerfile +++ b/Tests/Bench/Client/src/Dockerfile @@ -3,29 +3,28 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG TARGETARCH +ARG VERSION=1.0.0.0 + WORKDIR /src COPY ["Tests/Bench/Client/src/ArmoniK.Samples.Bench.Client.csproj", "Tests/Bench/Client/src/"] COPY ["Tests/Common/Client/src/ArmoniK.Core.Common.Tests.Client.csproj", "Tests/Common/Client/src/"] COPY ["Utils/src/ArmoniK.Core.Utils.csproj", "Utils/src/"] COPY ["Base/src/ArmoniK.Core.Base.csproj", "Base/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore "Tests/Bench/Client/src/ArmoniK.Samples.Bench.Client.csproj" +RUN dotnet restore -a ${TARGETARCH} "Tests/Bench/Client/src/ArmoniK.Samples.Bench.Client.csproj" COPY ["Tests/Bench/Client/src", "Tests/Bench/Client/src"] COPY ["Tests/Common/Client/src", "Tests/Common/Client/src"] COPY ["Utils/src/", "Utils/src/"] COPY ["Base/src/", "Base/src/"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/Bench/Client/src" -RUN dotnet build "ArmoniK.Samples.Bench.Client.csproj" -c Release -o /app/build -p:RunAnalyzers=false -p:WarningLevel=0 - -FROM build AS publish -ARG VERSION=1.0.0.0 -RUN dotnet publish "ArmoniK.Samples.Bench.Client.csproj" -c Release -o /app/publish -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish -a ${TARGETARCH} "ArmoniK.Samples.Bench.Client.csproj" --no-restore -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION FROM base AS final WORKDIR /app -COPY --from=publish /app/publish . +COPY --from=build /app/publish . RUN groupadd --gid 5000 armonikuser && useradd --home-dir /home/armonikuser --create-home --uid 5000 --gid 5000 --shell /bin/sh --skel /dev/null armonikuser USER armonikuser diff --git a/Tests/Bench/Server/src/Dockerfile b/Tests/Bench/Server/src/Dockerfile index 21b3cfeec..b5524c82c 100644 --- a/Tests/Bench/Server/src/Dockerfile +++ b/Tests/Bench/Server/src/Dockerfile @@ -3,23 +3,22 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG TARGETARCH +ARG VERSION=1.0.0.0 + WORKDIR /src COPY ["Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj", "Tests/Bench/Server/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore "Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj" +RUN dotnet restore -a ${TARGETARCH} "Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj" COPY ["Tests/Bench/Server/src", "Tests/Bench/Server/src"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/Bench/Server/src" -RUN dotnet build "ArmoniK.Samples.Bench.Server.csproj" -c Release -o /app/build -p:RunAnalyzers=false -p:WarningLevel=0 - -FROM build AS publish -ARG VERSION=1.0.0.0 -RUN dotnet publish "ArmoniK.Samples.Bench.Server.csproj" -c Release -o /app/publish -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish -a ${TARGETARCH} "ArmoniK.Samples.Bench.Server.csproj" -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION FROM base AS final WORKDIR /app -COPY --from=publish /app/publish . +COPY --from=build /app/publish . RUN groupadd --gid 5000 armonikuser && useradd --home-dir /home/armonikuser --create-home --uid 5000 --gid 5000 --shell /bin/sh --skel /dev/null armonikuser RUN mkdir /cache && chown armonikuser: /cache USER armonikuser diff --git a/Tests/HtcMock/Client/src/Dockerfile b/Tests/HtcMock/Client/src/Dockerfile index 7f35ccfda..02c3a48b2 100644 --- a/Tests/HtcMock/Client/src/Dockerfile +++ b/Tests/HtcMock/Client/src/Dockerfile @@ -3,29 +3,28 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG TARGETARCH +ARG VERSION=1.0.0.0 + WORKDIR /src COPY ["Tests/HtcMock/Client/src/ArmoniK.Samples.HtcMock.Client.csproj", "Tests/HtcMock/Client/src/"] COPY ["Tests/Common/Client/src/ArmoniK.Core.Common.Tests.Client.csproj", "Tests/Common/Client/src/"] COPY ["Utils/src/ArmoniK.Core.Utils.csproj", "Utils/src/"] COPY ["Base/src/ArmoniK.Core.Base.csproj", "Base/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore "Tests/HtcMock/Client/src/ArmoniK.Samples.HtcMock.Client.csproj" +RUN dotnet restore -a ${TARGETARCH} "Tests/HtcMock/Client/src/ArmoniK.Samples.HtcMock.Client.csproj" COPY ["Tests/HtcMock/Client/src", "Tests/HtcMock/Client/src"] COPY ["Tests/Common/Client/src", "Tests/Common/Client/src"] COPY ["Utils/src/", "Utils/src/"] COPY ["Base/src/", "Base/src/"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/HtcMock/Client/src" -RUN dotnet build "ArmoniK.Samples.HtcMock.Client.csproj" -c Release -o /app/build -p:RunAnalyzers=false -p:WarningLevel=0 - -FROM build AS publish -ARG VERSION=1.0.0.0 -RUN dotnet publish "ArmoniK.Samples.HtcMock.Client.csproj" -c Release -o /app/publish -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish -a ${TARGETARCH} "ArmoniK.Samples.HtcMock.Client.csproj" --no-restore -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION FROM base AS final WORKDIR /app -COPY --from=publish /app/publish . +COPY --from=build /app/publish . RUN groupadd --gid 5000 armonikuser && useradd --home-dir /home/armonikuser --create-home --uid 5000 --gid 5000 --shell /bin/sh --skel /dev/null armonikuser USER armonikuser diff --git a/Tests/HtcMock/Server/src/Dockerfile b/Tests/HtcMock/Server/src/Dockerfile index 676ced649..bc2cb59d3 100644 --- a/Tests/HtcMock/Server/src/Dockerfile +++ b/Tests/HtcMock/Server/src/Dockerfile @@ -3,23 +3,22 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG TARGETARCH +ARG VERSION=1.0.0.0 + WORKDIR /src COPY ["Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj", "Tests/HtcMock/Server/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore "Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj" +RUN dotnet restore -a ${TARGETARCH} "Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj" COPY ["Tests/HtcMock/Server/src", "Tests/HtcMock/Server/src"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/HtcMock/Server/src" -RUN dotnet build "ArmoniK.Samples.HtcMock.Server.csproj" -c Release -o /app/build -p:RunAnalyzers=false -p:WarningLevel=0 - -FROM build AS publish -ARG VERSION=1.0.0.0 -RUN dotnet publish "ArmoniK.Samples.HtcMock.Server.csproj" -c Release -o /app/publish -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish -a ${TARGETARCH} "ArmoniK.Samples.HtcMock.Server.csproj" -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION FROM base AS final WORKDIR /app -COPY --from=publish /app/publish . +COPY --from=build /app/publish . RUN groupadd --gid 5000 armonikuser && useradd --home-dir /home/armonikuser --create-home --uid 5000 --gid 5000 --shell /bin/sh --skel /dev/null armonikuser RUN mkdir /cache && chown armonikuser: /cache USER armonikuser diff --git a/Tests/Stream/Client/Dockerfile b/Tests/Stream/Client/Dockerfile index 8962be78b..2f4c8832c 100644 --- a/Tests/Stream/Client/Dockerfile +++ b/Tests/Stream/Client/Dockerfile @@ -1,22 +1,26 @@ #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/sdk:8.0 AS base +WORKDIR /app + +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG TARGETARCH +ARG VERSION=1.0.0.0 -FROM base AS build WORKDIR /src COPY ["Tests/Stream/Client/ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj", "Tests/Stream/Client/"] COPY ["Tests/Stream/Common/ArmoniK.Extensions.Common.StreamWrapper.Tests.Common.csproj", "Tests/Stream/Common/"] COPY ["Utils/src/ArmoniK.Core.Utils.csproj", "Utils/src/"] COPY ["Base/src/ArmoniK.Core.Base.csproj", "Base/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore "Tests/Stream/Client/ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj" +RUN dotnet restore -a ${TARGETARCH} "Tests/Stream/Client/ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj" COPY ["Tests/Stream/Client", "Tests/Stream/Client"] COPY ["Tests/Stream/Common", "Tests/Stream/Common"] COPY ["Utils/src/", "Utils/src/"] COPY ["Base/src/", "Base/src/"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/Stream/Client" -RUN dotnet build "ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj" -c Release -o /app/build -p:RunAnalyzers=false -p:WarningLevel=0 +RUN dotnet build "ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj" -a ${TARGETARCH} -c Release -o /app/build -p:RunAnalyzers=false -p:WarningLevel=0 FROM base as final diff --git a/Tests/Stream/Server/Dockerfile b/Tests/Stream/Server/Dockerfile index 3f9cbc8f6..9e29e0a0d 100644 --- a/Tests/Stream/Server/Dockerfile +++ b/Tests/Stream/Server/Dockerfile @@ -6,25 +6,24 @@ ENV ASPNETCORE_URLS http://+:1080;https://+1443 EXPOSE 1080 EXPOSE 1443 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG TARGETARCH +ARG VERSION=1.0.0.0 + WORKDIR /src COPY ["Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj", "Tests/Stream/Server/"] COPY ["Tests/Stream/Common/ArmoniK.Extensions.Common.StreamWrapper.Tests.Common.csproj", "Tests/Stream/Common/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore "Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj" +RUN dotnet restore -a ${TARGETARCH} "Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj" COPY ["Tests/Stream/Server", "Tests/Stream/Server"] COPY ["Tests/Stream/Common", "Tests/Stream/Common"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/Stream/Server" -RUN dotnet build "ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj" -c Release -o /app/build -p:RunAnalyzers=false -p:WarningLevel=0 - -FROM build AS publish -ARG VERSION=1.0.0.0 -RUN dotnet publish "ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj" -c Release -o /app/publish -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish -a ${TARGETARCH} "ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj" --no-restore -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION FROM base AS final WORKDIR /app -COPY --from=publish /app/publish . +COPY --from=build /app/publish . RUN groupadd --gid 5000 armonikuser && useradd --home-dir /home/armonikuser --create-home --uid 5000 --gid 5000 --shell /bin/sh --skel /dev/null armonikuser RUN mkdir /cache && chown armonikuser: /cache USER armonikuser diff --git a/justfile b/justfile index e19c6e07b..2aaa9cd9e 100644 --- a/justfile +++ b/justfile @@ -13,8 +13,9 @@ worker := "htcmock" object := "redis" replicas := "3" partitions := "2" -builder := "regular" -platform := "linux/arm64" +platform := "" +push := "false" +load := "true" # Export them as terraform environment variables export TF_VAR_core_tag := tag @@ -211,20 +212,21 @@ build imageTag dockerFile target="": if [ "{{target}}" != "" ]; then target_parameter="--target {{target}}" fi + platform_parameter="" + if [ "{{platform}}" != "" ]; then + platform_parameter="--platform {{platform}}" + fi + push_parameter="" + if [ "{{push}}" == "true" ]; then + push_parameter="--push" + fi + load_parameter="" + if [ "{{load}}" == "true" ]; then + load_parameter="--load" + fi set -x - case "{{builder}}" in - regular) - docker build --build-arg VERSION={{tag}} $target_parameter -t "{{imageTag}}" -f "{{dockerFile}}" ./ - ;; - buildx) - docker buildx build --push --progress=plain --platform {{platform}} --build-arg VERSION={{tag}} $target_parameter -t "{{imageTag}}" -f "{{dockerFile}}" ./ - ;; - *) - echo wrong builder - exit 1 - ;; - esac + docker buildx build --progress=plain --build-arg VERSION={{tag}} $platform_parameter $load_parameter $push_parameter $target_parameter -t "{{imageTag}}" -f "{{dockerFile}}" ./ # Build Worker buildWorker: (build TF_VAR_worker_image TF_VAR_worker_docker_file_path + "Dockerfile") From aa56c430c52b12662e4e0ad83ba4d08af5f86246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= <88328270+aneojgurhem@users.noreply.github.com> Date: Mon, 8 Jan 2024 18:11:40 +0100 Subject: [PATCH 4/4] use " in bash commands Co-authored-by: lemaitre-aneo <91961298+lemaitre-aneo@users.noreply.github.com> --- Tests/Bench/Client/src/Dockerfile | 4 ++-- Tests/Bench/Server/src/Dockerfile | 4 ++-- Tests/HtcMock/Client/src/Dockerfile | 4 ++-- Tests/HtcMock/Server/src/Dockerfile | 4 ++-- Tests/Stream/Client/Dockerfile | 4 ++-- Tests/Stream/Server/Dockerfile | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Tests/Bench/Client/src/Dockerfile b/Tests/Bench/Client/src/Dockerfile index 1b6bfd0d6..2afeef33d 100644 --- a/Tests/Bench/Client/src/Dockerfile +++ b/Tests/Bench/Client/src/Dockerfile @@ -13,14 +13,14 @@ COPY ["Tests/Common/Client/src/ArmoniK.Core.Common.Tests.Client.csproj", "Tests/ COPY ["Utils/src/ArmoniK.Core.Utils.csproj", "Utils/src/"] COPY ["Base/src/ArmoniK.Core.Base.csproj", "Base/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore -a ${TARGETARCH} "Tests/Bench/Client/src/ArmoniK.Samples.Bench.Client.csproj" +RUN dotnet restore -a "${TARGETARCH}" "Tests/Bench/Client/src/ArmoniK.Samples.Bench.Client.csproj" COPY ["Tests/Bench/Client/src", "Tests/Bench/Client/src"] COPY ["Tests/Common/Client/src", "Tests/Common/Client/src"] COPY ["Utils/src/", "Utils/src/"] COPY ["Base/src/", "Base/src/"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/Bench/Client/src" -RUN dotnet publish -a ${TARGETARCH} "ArmoniK.Samples.Bench.Client.csproj" --no-restore -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish -a "${TARGETARCH}" "ArmoniK.Samples.Bench.Client.csproj" --no-restore -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion="$VERSION" -p:Version="$VERSION" FROM base AS final WORKDIR /app diff --git a/Tests/Bench/Server/src/Dockerfile b/Tests/Bench/Server/src/Dockerfile index b5524c82c..7d00d512b 100644 --- a/Tests/Bench/Server/src/Dockerfile +++ b/Tests/Bench/Server/src/Dockerfile @@ -10,11 +10,11 @@ ARG VERSION=1.0.0.0 WORKDIR /src COPY ["Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj", "Tests/Bench/Server/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore -a ${TARGETARCH} "Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj" +RUN dotnet restore -a "${TARGETARCH}" "Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj" COPY ["Tests/Bench/Server/src", "Tests/Bench/Server/src"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/Bench/Server/src" -RUN dotnet publish -a ${TARGETARCH} "ArmoniK.Samples.Bench.Server.csproj" -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish -a "${TARGETARCH}" "ArmoniK.Samples.Bench.Server.csproj" -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion="$VERSION" -p:Version="$VERSION" FROM base AS final WORKDIR /app diff --git a/Tests/HtcMock/Client/src/Dockerfile b/Tests/HtcMock/Client/src/Dockerfile index 02c3a48b2..33e9ddde4 100644 --- a/Tests/HtcMock/Client/src/Dockerfile +++ b/Tests/HtcMock/Client/src/Dockerfile @@ -13,14 +13,14 @@ COPY ["Tests/Common/Client/src/ArmoniK.Core.Common.Tests.Client.csproj", "Tests/ COPY ["Utils/src/ArmoniK.Core.Utils.csproj", "Utils/src/"] COPY ["Base/src/ArmoniK.Core.Base.csproj", "Base/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore -a ${TARGETARCH} "Tests/HtcMock/Client/src/ArmoniK.Samples.HtcMock.Client.csproj" +RUN dotnet restore -a "${TARGETARCH}" "Tests/HtcMock/Client/src/ArmoniK.Samples.HtcMock.Client.csproj" COPY ["Tests/HtcMock/Client/src", "Tests/HtcMock/Client/src"] COPY ["Tests/Common/Client/src", "Tests/Common/Client/src"] COPY ["Utils/src/", "Utils/src/"] COPY ["Base/src/", "Base/src/"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/HtcMock/Client/src" -RUN dotnet publish -a ${TARGETARCH} "ArmoniK.Samples.HtcMock.Client.csproj" --no-restore -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish -a "${TARGETARCH}" "ArmoniK.Samples.HtcMock.Client.csproj" --no-restore -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion="$VERSION" -p:Version="$VERSION" FROM base AS final WORKDIR /app diff --git a/Tests/HtcMock/Server/src/Dockerfile b/Tests/HtcMock/Server/src/Dockerfile index bc2cb59d3..9dfe0b603 100644 --- a/Tests/HtcMock/Server/src/Dockerfile +++ b/Tests/HtcMock/Server/src/Dockerfile @@ -10,11 +10,11 @@ ARG VERSION=1.0.0.0 WORKDIR /src COPY ["Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj", "Tests/HtcMock/Server/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore -a ${TARGETARCH} "Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj" +RUN dotnet restore -a "${TARGETARCH}" "Tests/HtcMock/Server/src/ArmoniK.Samples.HtcMock.Server.csproj" COPY ["Tests/HtcMock/Server/src", "Tests/HtcMock/Server/src"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/HtcMock/Server/src" -RUN dotnet publish -a ${TARGETARCH} "ArmoniK.Samples.HtcMock.Server.csproj" -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish -a "${TARGETARCH}" "ArmoniK.Samples.HtcMock.Server.csproj" -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion="$VERSION" -p:Version="$VERSION" FROM base AS final WORKDIR /app diff --git a/Tests/Stream/Client/Dockerfile b/Tests/Stream/Client/Dockerfile index 2f4c8832c..e7266f298 100644 --- a/Tests/Stream/Client/Dockerfile +++ b/Tests/Stream/Client/Dockerfile @@ -13,14 +13,14 @@ COPY ["Tests/Stream/Common/ArmoniK.Extensions.Common.StreamWrapper.Tests.Common. COPY ["Utils/src/ArmoniK.Core.Utils.csproj", "Utils/src/"] COPY ["Base/src/ArmoniK.Core.Base.csproj", "Base/src/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore -a ${TARGETARCH} "Tests/Stream/Client/ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj" +RUN dotnet restore -a "${TARGETARCH}" "Tests/Stream/Client/ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj" COPY ["Tests/Stream/Client", "Tests/Stream/Client"] COPY ["Tests/Stream/Common", "Tests/Stream/Common"] COPY ["Utils/src/", "Utils/src/"] COPY ["Base/src/", "Base/src/"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/Stream/Client" -RUN dotnet build "ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj" -a ${TARGETARCH} -c Release -o /app/build -p:RunAnalyzers=false -p:WarningLevel=0 +RUN dotnet build "ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.csproj" -a "${TARGETARCH}" -c Release -o /app/build -p:RunAnalyzers=false -p:WarningLevel=0 FROM base as final diff --git a/Tests/Stream/Server/Dockerfile b/Tests/Stream/Server/Dockerfile index 9e29e0a0d..5e4ae218c 100644 --- a/Tests/Stream/Server/Dockerfile +++ b/Tests/Stream/Server/Dockerfile @@ -14,12 +14,12 @@ WORKDIR /src COPY ["Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj", "Tests/Stream/Server/"] COPY ["Tests/Stream/Common/ArmoniK.Extensions.Common.StreamWrapper.Tests.Common.csproj", "Tests/Stream/Common/"] COPY ["Common/src/ArmoniK.Core.Common.csproj", "Common/src/"] -RUN dotnet restore -a ${TARGETARCH} "Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj" +RUN dotnet restore -a "${TARGETARCH}" "Tests/Stream/Server/ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj" COPY ["Tests/Stream/Server", "Tests/Stream/Server"] COPY ["Tests/Stream/Common", "Tests/Stream/Common"] COPY ["Common/src", "Common/src"] WORKDIR "/src/Tests/Stream/Server" -RUN dotnet publish -a ${TARGETARCH} "ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj" --no-restore -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION +RUN dotnet publish -a "${TARGETARCH}" "ArmoniK.Extensions.Common.StreamWrapper.Tests.Server.csproj" --no-restore -o /app/publish -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion="$VERSION" -p:Version="$VERSION" FROM base AS final WORKDIR /app