From e9907ce41e686b52f0e949b93e13be677c04306f Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 7 Apr 2023 10:29:32 -0500 Subject: [PATCH] 1.5 upgrade (#321) * upgraded to Akka.NET v1.5 * added centralized package management * fixed serilog package reference * upgraded to .NET 7.0 * fixed the test project .NET verison * Update Directory.Build.props * Update Directory.Packages.props * update build scripts to target .NET 7.0 --- NuGet.config | 14 +++++++++ RELEASE_NOTES.md | 6 ++-- build-system/azure-pipeline.template.yaml | 4 +-- build-system/windows-release.yaml | 4 +-- build.fsx | 4 +-- src/{common.props => Directory.Build.props} | 18 ++++++------ src/Directory.Packages.props | 31 ++++++++++++++++++++ src/Lighthouse.Tests/Lighthouse.Tests.csproj | 13 ++++---- src/Lighthouse/Dockerfile-arm64 | 6 ++-- src/Lighthouse/Dockerfile-linux | 6 ++-- src/Lighthouse/Dockerfile-windows | 6 ++-- src/Lighthouse/Lighthouse.csproj | 21 ++++++------- src/Lighthouse/Program.cs | 2 +- src/Lighthouse/buildLinuxDockerImages.sh | 2 +- src/Lighthouse/buildWindowsDockerImages.ps1 | 2 +- 15 files changed, 89 insertions(+), 50 deletions(-) create mode 100644 NuGet.config rename src/{common.props => Directory.Build.props} (53%) create mode 100644 src/Directory.Packages.props diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 00000000..725c4637 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 884002d1..22f89bf1 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,3 @@ -#### 1.7.2 December 20 2022 #### +#### 1.8.0 March 02 2023 #### -* [Bumped Akka.NET version to 1.4.47](https://github.com/akkadotnet/akka.net/releases/tag/1.4.47) -* [Added Serilog logging, configurable by `/app/serilog.json`](https://github.com/petabridge/lighthouse/pull/304) -* [Upgraded to Petabridge.Cmd 1.2.1](https://cmd.petabridge.com/articles/RELEASE_NOTES.html) and used Akka.Hosting support. +* [Bumped Akka.NET version to 1.5.0](https://github.com/akkadotnet/akka.net/releases/tag/1.5.0) \ No newline at end of file diff --git a/build-system/azure-pipeline.template.yaml b/build-system/azure-pipeline.template.yaml index 73913491..886d4f49 100644 --- a/build-system/azure-pipeline.template.yaml +++ b/build-system/azure-pipeline.template.yaml @@ -17,9 +17,9 @@ jobs: submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules persistCredentials: true - task: UseDotNet@2 - displayName: 'Use .NET 6 SDK 6.0.100' + displayName: 'Use .NET 7' inputs: - version: 6.0.100 + version: 7.x # Linux or macOS - script: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes displayName: Docker - Register QEMU diff --git a/build-system/windows-release.yaml b/build-system/windows-release.yaml index 3e526617..0d93871b 100644 --- a/build-system/windows-release.yaml +++ b/build-system/windows-release.yaml @@ -22,9 +22,9 @@ jobs: demands: Cmd steps: - task: UseDotNet@2 - displayName: 'Use .NET 6 SDK 6.0.100' + displayName: 'Use .NET 7 SDK' inputs: - version: 6.0.100 + version: 7.x - task: BatchScript@1 displayName: 'dotnet publish' inputs: diff --git a/build.fsx b/build.fsx index 6755c33f..629c23b6 100644 --- a/build.fsx +++ b/build.fsx @@ -59,8 +59,8 @@ Target "Clean" (fun _ -> ) Target "AssemblyInfo" (fun _ -> - XmlPokeInnerText "./src/common.props" "//Project/PropertyGroup/VersionPrefix" releaseNotes.AssemblyVersion - XmlPokeInnerText "./src/common.props" "//Project/PropertyGroup/PackageReleaseNotes" (releaseNotes.Notes |> String.concat "\n") + XmlPokeInnerText "./src/Directory.Build.props" "//Project/PropertyGroup/VersionPrefix" releaseNotes.AssemblyVersion + XmlPokeInnerText "./src/Directory.Build.props" "//Project/PropertyGroup/PackageReleaseNotes" (releaseNotes.Notes |> String.concat "\n") ) Target "Build" (fun _ -> diff --git a/src/common.props b/src/Directory.Build.props similarity index 53% rename from src/common.props rename to src/Directory.Build.props index ac9fc7f5..0d55f682 100644 --- a/src/common.props +++ b/src/Directory.Build.props @@ -1,13 +1,9 @@ - Copyright © 2015-2022 Petabridge, LLC + Copyright © 2015-2023 Petabridge, LLC Petabridge - 1.7.0 - [Bumped Akka.NET version to 1.4.40](https://github.com/akkadotnet/akka.net/releases/tag/1.4.40) -[Bumped Akka.Hosting to 0.4.1](https://github.com/akkadotnet/Akka.Hosting/releases/tag/0.4.1). -[Upgraded to Petabridge.Cmd 1.1.0](https://cmd.petabridge.com/articles/RELEASE_NOTES.html) and used Akka.Hosting support; -Added ARM64 support to Docker image `petabridge/lighthouse:latest` and all other Linux images for Lighthouse. -Migrated onto .NET 6. + 1.8.0 + [Bumped Akka.NET version to 1.5.0](https://github.com/akkadotnet/akka.net/releases/tag/1.5.0) https://petabridge.com/images/logo.png https://github.com/petabridge/lighthouse @@ -16,16 +12,20 @@ Migrated onto .NET 6. https://github.com/petabridge/lighthouse/blob/dev/LICENSE $(NoWarn);CS1591 + 11.0 2.4.2 17.5.0 6.8.0 - net6.0 + net7.0 netstandard1.6 net461 net6.0 1.5.1 - 1.2.1 + 1.3.0 + + + diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props new file mode 100644 index 00000000..0e7d2245 --- /dev/null +++ b/src/Directory.Packages.props @@ -0,0 +1,31 @@ + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Lighthouse.Tests/Lighthouse.Tests.csproj b/src/Lighthouse.Tests/Lighthouse.Tests.csproj index 8173a350..a4e07794 100644 --- a/src/Lighthouse.Tests/Lighthouse.Tests.csproj +++ b/src/Lighthouse.Tests/Lighthouse.Tests.csproj @@ -1,15 +1,14 @@  - - $(NetFrameworkTestVersion) + net7.0 false - - - - - + + + + + diff --git a/src/Lighthouse/Dockerfile-arm64 b/src/Lighthouse/Dockerfile-arm64 index 3ce21932..292c3919 100644 --- a/src/Lighthouse/Dockerfile-arm64 +++ b/src/Lighthouse/Dockerfile-arm64 @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS base +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS base WORKDIR /app # Install Petabridge.Cmd client so it can be invoked remotely via @@ -7,9 +7,9 @@ RUN dotnet tool install --global pbm # RUN pbm help -COPY ./bin/Release/net6.0/publish/ /app +COPY ./bin/Release/net7.0/publish/ /app -FROM mcr.microsoft.com/dotnet/runtime:6.0 AS app +FROM mcr.microsoft.com/dotnet/runtime:7.0 AS app WORKDIR /app COPY --from=base /app /app diff --git a/src/Lighthouse/Dockerfile-linux b/src/Lighthouse/Dockerfile-linux index 3ce21932..292c3919 100644 --- a/src/Lighthouse/Dockerfile-linux +++ b/src/Lighthouse/Dockerfile-linux @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS base +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS base WORKDIR /app # Install Petabridge.Cmd client so it can be invoked remotely via @@ -7,9 +7,9 @@ RUN dotnet tool install --global pbm # RUN pbm help -COPY ./bin/Release/net6.0/publish/ /app +COPY ./bin/Release/net7.0/publish/ /app -FROM mcr.microsoft.com/dotnet/runtime:6.0 AS app +FROM mcr.microsoft.com/dotnet/runtime:7.0 AS app WORKDIR /app COPY --from=base /app /app diff --git a/src/Lighthouse/Dockerfile-windows b/src/Lighthouse/Dockerfile-windows index 7c4b4e47..ccae0ef1 100644 --- a/src/Lighthouse/Dockerfile-windows +++ b/src/Lighthouse/Dockerfile-windows @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS base +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS base WORKDIR /app # Install Petabridge.Cmd client so it can be invoked remotely via @@ -10,9 +10,9 @@ WORKDIR /app # RUN pbm help -COPY ./bin/Release/net6.0/publish/ /app +COPY ./bin/Release/net7.0/publish/ /app -FROM mcr.microsoft.com/dotnet/runtime:6.0 AS app +FROM mcr.microsoft.com/dotnet/runtime:7.0 AS app WORKDIR /app COPY --from=base /app /app diff --git a/src/Lighthouse/Lighthouse.csproj b/src/Lighthouse/Lighthouse.csproj index fc752d53..46540b1b 100644 --- a/src/Lighthouse/Lighthouse.csproj +++ b/src/Lighthouse/Lighthouse.csproj @@ -1,21 +1,18 @@  - Exe $(NetCoreVersion) - - - - - - - 0.5.3 - - - - + + + + + + + + + diff --git a/src/Lighthouse/Program.cs b/src/Lighthouse/Program.cs index 87264a6d..1d106fac 100644 --- a/src/Lighthouse/Program.cs +++ b/src/Lighthouse/Program.cs @@ -28,7 +28,7 @@ public static async Task Main(string[] args) { services.AddAkka(actorSystemName, builder => { - builder.AddHocon(config) // clustering / remoting automatically configured here + builder.AddHocon(config, HoconAddMode.Prepend) // clustering / remoting automatically configured here .AddPetabridgeCmd(cmd => { cmd.RegisterCommandPalette(ClusterCommands.Instance); diff --git a/src/Lighthouse/buildLinuxDockerImages.sh b/src/Lighthouse/buildLinuxDockerImages.sh index c97ef9e0..32f120ee 100644 --- a/src/Lighthouse/buildLinuxDockerImages.sh +++ b/src/Lighthouse/buildLinuxDockerImages.sh @@ -20,7 +20,7 @@ fi echo "Building project..." -dotnet publish -c Release --framework net6.0 +dotnet publish -c Release --framework net7.0 dotnet build-server shutdown LINUX_IMAGE="$IMAGE_NAME:linux-$IMAGE_VERSION" diff --git a/src/Lighthouse/buildWindowsDockerImages.ps1 b/src/Lighthouse/buildWindowsDockerImages.ps1 index dda2195b..4cedaf90 100644 --- a/src/Lighthouse/buildWindowsDockerImages.ps1 +++ b/src/Lighthouse/buildWindowsDockerImages.ps1 @@ -6,7 +6,7 @@ param ( ) Write-Host "Building project..." -dotnet publish -c Release --framework net6.0 +dotnet publish -c Release --framework net7.0 dotnet build-server shutdown $windowsImage = "{0}:windows-{1}" -f $imageName,$tagVersion