From 50aaf4ce985daf5e68ea1ba31d95bbea3ecc8904 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Mon, 26 Feb 2024 06:06:23 -0500 Subject: [PATCH] Upgrade to .Net 8 (#78) * Upgrade to net8 * WiX upgrade to 3.14 --- .github/workflows/main-ci-build.yml | 53 +++++++------------ Directory.Build.targets | 2 +- Dockerfile | 12 ++--- NuGetPackageVerifier.json | 2 +- OVERVIEW.md | 6 +-- build/dependencies.props | 6 +-- build/repo.props | 10 ++-- package-all.cmd | 27 ++++------ package.sh | 14 ++--- .../Configuration/ConfigException.cs | 1 + .../Microsoft.Azure.Relay.Bridge.csproj | 10 ++-- .../azbridge-installer.wixproj | 6 +-- src/azbridge-installer/build.cmd | 2 +- src/azbridge-installer/packages.config | 2 +- src/azbridge-installer/restore.cmd | 2 +- src/azbridge/azbridge.csproj | 23 ++++---- test/mysql/Test.proj | 2 +- test/mysql/my.cnf | 1 + test/mysql/mysql.server.dockerfile | 2 +- test/mysql/test.cmd | 4 +- test/mysql/test.sh | 8 +-- test/nginx/Test.proj | 7 +-- test/nginx/test.cmd | 4 +- test/nginx/test.sh | 12 +++-- test/node/Test.proj | 3 +- test/node/test.cmd | 4 +- test/unit/Directory.Build.props | 2 +- .../Microsoft.Azure.Relay.Bridge.Tests.csproj | 2 +- verify-build.sh | 8 +-- version.props | 2 +- 30 files changed, 109 insertions(+), 130 deletions(-) mode change 100644 => 100755 test/mysql/test.sh mode change 100644 => 100755 test/nginx/test.sh diff --git a/.github/workflows/main-ci-build.yml b/.github/workflows/main-ci-build.yml index 6a4790f..50f9d09 100644 --- a/.github/workflows/main-ci-build.yml +++ b/.github/workflows/main-ci-build.yml @@ -37,7 +37,7 @@ jobs: - name: Setup .NET SDK uses: actions/setup-dotnet@v1 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore @@ -49,58 +49,43 @@ jobs: docker save azbridge:${{ env.PRODVERSION }} > artifacts/build/images/azbridge-oci-image-${{ env.PRODVERSION }}.${{ env.PATCHVERSION }}.tar if: matrix.os == 'ubuntu-latest' - - name: Build for Windows 10-x64 - run: dotnet msbuild /t:Package /p:WindowsOnly=true /p:RuntimeIdentifier=win10-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel + - name: Build for Windows-x64 + run: dotnet msbuild /t:Package /p:WindowsOnly=true /p:RuntimeIdentifier=win-x64 /p:Configuration=Release /p:TargetFramework=net8.0 /p:VersionSuffix=rel if: matrix.os == 'windows-latest' - - name: Build for Windows 10-arm64 - run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=win10-arm /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel + - name: Build for Windows-arm64 + run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=win-arm /p:Configuration=Release /p:TargetFramework=net8.0 /p:VersionSuffix=rel if: matrix.os == 'windows-latest' - - name: Build for Windows 10-x86 - run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=win10-x86 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel + - name: Build for Windows-x86 + run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=win-x86 /p:Configuration=Release /p:TargetFramework=net8.0 /p:VersionSuffix=rel if: matrix.os == 'windows-latest' - name: Build for macOS-x64 - run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=osx-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel + run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=osx-x64 /p:Configuration=Release /p:TargetFramework=net8.0 /p:VersionSuffix=rel if: matrix.os == 'ubuntu-latest' - - name: Build for Ubuntu 18-x64 - run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=ubuntu.18.04-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel + - name: Build for macOS-arm64 + run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=osx-arm64 /p:Configuration=Release /p:TargetFramework=net8.0 /p:VersionSuffix=rel if: matrix.os == 'ubuntu-latest' - - name: Build for Ubuntu 18-arm64 - run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=ubuntu.18.04-arm64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel + - name: Build for Linux-x64 + run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=linux-x64 /p:Configuration=Release /p:TargetFramework=net8.0 /p:VersionSuffix=rel if: matrix.os == 'ubuntu-latest' - - name: Build for Ubuntu 20-x64 - run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=ubuntu.20.04-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel - if: matrix.os == 'ubuntu-latest' - - name: Build for Ubuntu 20-arm64 - run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=ubuntu.20.04-arm64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel - if: matrix.os == 'ubuntu-latest' - - name: Build for Debian 10-x64 - run: dotnet msbuild /t:Package /p:WindowsOnly=false /p:RuntimeIdentifier=debian.10-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel - if: matrix.os == 'ubuntu-latest' - - name: Build for OpenSUSE 15-x64 - run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=opensuse.15.0-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel - if: matrix.os == 'ubuntu-latest' - - name: Build for Fedora 30-x64 - run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=fedora.34-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel - if: matrix.os == 'ubuntu-latest' - - name: Build for CentOS 9-x64 - run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=centos.9-x64 /p:Configuration=Release /p:TargetFramework=net6.0 /p:VersionSuffix=rel + - name: Build for Linux-arm64 + run: dotnet msbuild /t:Restore,Package /p:WindowsOnly=false /p:RuntimeIdentifier=linux-arm64 /p:Configuration=Release /p:TargetFramework=net8.0 /p:VersionSuffix=rel if: matrix.os == 'ubuntu-latest' - name: Unit Test Windows x64 env: AZBRIDGE_TEST_CXNSTRING: ${{ secrets.AZBRIDGE_TEST_CXNSTRING }} - run: dotnet test /p:TargetFramework=net6.0 /p:RuntimeIdentifier=win10-x64 /p:Configuration=Debug + run: dotnet test /p:TargetFramework=net8.0 /p:RuntimeIdentifier=win-x64 /p:Configuration=Debug if: matrix.os == 'windows-latest' - - name: Unit Test Ubuntu 20.04 + - name: Unit Test Linux x64 env: AZBRIDGE_TEST_CXNSTRING: ${{ secrets.AZBRIDGE_TEST_CXNSTRING }} - run: dotnet test /p:TargetFramework=net6.0 /p:RuntimeIdentifier=ubuntu.20.04-x64 /p:Configuration=Debug + run: dotnet test /p:TargetFramework=net8.0 /p:RuntimeIdentifier=linux-x64 /p:Configuration=Debug if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v2 with: name: XBuild - path: artifacts/build/net6.0 + path: artifacts/build/net8.0 - uses: actions/upload-artifact@v2 with: @@ -125,7 +110,7 @@ jobs: uses: ncipollo/release-action@v1 if: startsWith(github.ref, 'refs/tags/v') with: - artifacts: "artifacts/build/net6.0/*,artifacts/build/images/*" + artifacts: "artifacts/build/net8.0/*,artifacts/build/images/*" generateReleaseNotes: true allowUpdates: true diff --git a/Directory.Build.targets b/Directory.Build.targets index 6472218..1764b30 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,6 +1,6 @@  - $(MicrosoftNETCoreAppPackageVersion) + $(MicrosoftNETCoreAppPackageVersion) 99.9 diff --git a/Dockerfile b/Dockerfile index d955811..264137f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,21 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 as publish +FROM mcr.microsoft.com/dotnet/sdk:8.0 as publish # ENV http_proxy=http://proxy.corporation.example:8080 # ENV https_proxy=http://proxy.corporation.example:8080 COPY . /azure-relay-bridge/ WORKDIR /azure-relay-bridge/src/azbridge -RUN dotnet publish azbridge.csproj -c Release -f net6.0 -p:SelfContained=false -r ubuntu-x64 -p:PublishTrimmed=false -o /app +RUN dotnet publish azbridge.csproj -c Release -f net8.0 -p:SelfContained=false -r linux-x64 -p:PublishTrimmed=false -o /app -FROM mcr.microsoft.com/dotnet/runtime:6.0 -ARG REVISION=0.6.0 -ARG VERSION=0.6 +FROM mcr.microsoft.com/dotnet/runtime:8.0 +ARG REVISION=0.9.0 +ARG VERSION=0.9 LABEL org.opencontainers.image.documentation="https://github.com/Azure/azure-relay-bridge/blob/master/README.md" LABEL org.opencontainers.image.source="https://github.com/Azure/azure-relay-bridge" LABEL org.opencontainers.image.url="https://github.com/Azure/azure-relay-bridge" LABEL org.opencontainers.image.authors="askservicebus@microsoft.com" LABEL org.opencontainers.image.title="Microsoft Azure Relay Bridge" LABEL org.opencontainers.image.description="CLI tool to create TCP, UDP, Sockets, and HTTP tunnels via proxies and firewalls using the Azure Relay service." -LABEL org.opencontainers.image.base.name="mcr.microsoft.com/dotnet/runtime:6.0" +LABEL org.opencontainers.image.base.name="mcr.microsoft.com/dotnet/runtime:8.0" LABEL org.opencontainers.image.revision=${REVISION} LABEL org.opencontainers.image.revision=${VERSION} WORKDIR /app diff --git a/NuGetPackageVerifier.json b/NuGetPackageVerifier.json index 8fc2672..fa50e01 100644 --- a/NuGetPackageVerifier.json +++ b/NuGetPackageVerifier.json @@ -5,7 +5,7 @@ "azbridge": { "Exclusions": { "DOC_MISSING": { - "lib/net6.0/azbridge.dll": "no public API" + "lib/net8.0/azbridge.dll": "no public API" } } } diff --git a/OVERVIEW.md b/OVERVIEW.md index c7ab522..126c1b0 100644 --- a/OVERVIEW.md +++ b/OVERVIEW.md @@ -225,7 +225,7 @@ The package install will put the tool into `/usr/share/azbridge`. You can also install the tool from respective platform *.tar.gz archive. For Linux, you need to [explicitly install Linux prerequisites for .NET -6.0](https://docs.microsoft.com/en-us/dotnet/core/install/linux) for your +8.0](https://docs.microsoft.com/en-us/dotnet/core/install/linux) for your respective distribution. For macOS, you need to [install prerequisites from this list](https://docs.microsoft.com/en-us/dotnet/core/install/macos). @@ -238,12 +238,12 @@ built on Windows. You will at least need the "Build Tools for Visual Studio 2022", and ideally a local install of Visual Studio 2022 with desktop C# support. -All other versions are built with the .NET 6.0 SDK. The DEB and +All other versions are built with the .NET 8.0 SDK. The DEB and RPM packages are only created when building on a Unix (i.e. Linux or macOS) host. The ideal build environment is a Windows host with Docker for Windows installed. The `package-all.cmd` script will first build and package all Windows targets, -and then launch a docker-based build with the official Microsoft .NET Core 6.0 +and then launch a docker-based build with the official Microsoft .NET Core 8.0 SDK image for the remaining targets. The `package.sh` script will only build and package the Unix targets, the `package.cmd` script only Windows targets. The `build.cmd` and `build.sh` scripts only build the project without packaging. diff --git a/build/dependencies.props b/build/dependencies.props index 992ec8c..6c6ae23 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,10 +4,10 @@ 0.1.220 - 3.11.2 + 3.14.0 1.1.28 2.0.66 - 6.0.0 + 8.0.0 2.2.8 17.3.0 4.3.0 @@ -16,7 +16,7 @@ 4.3.0 4.5.5 4.3.0 - 6.0.0 + 6.0.1 4.3.4 4.3.0 12.0.0 diff --git a/build/repo.props b/build/repo.props index 3514b60..b5cf7d7 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,17 +1,17 @@  false - net6.0 + net8.0 $(CoreFrameworks) - net6.0 - win10-x64;win10-x86;win10-arm64; - osx-x64;debian.10-x64;ubuntu.18.04-x64;ubuntu.18.04-arm64;ubuntu.20.04-x64;ubuntu.20.04-arm64;opensuse.15.0-x64;fedora.34-x64;centos.9-x64 + net8.0 + win-x64;win-x86;win-arm64; + osx-x64;osx-arm64;linux-x64;linux-arm64 $(WindowsRuntimeIdentifiers)$(UnixRuntimeIdentifiers) _WINDOWS - + _SYSTEMD diff --git a/package-all.cmd b/package-all.cmd index f5b837a..c584a85 100644 --- a/package-all.cmd +++ b/package-all.cmd @@ -10,27 +10,22 @@ echo *** Building and packaging Windows Targets if %_DOCKER_BUILD% == "true" ( echo *** Windows only - dotnet msbuild /t:restore,package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net6.0 /p:RuntimeIdentifier=win10-x64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net6.0 /p:RuntimeIdentifier=win10-arm64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net6.0 /p:RuntimeIdentifier=win10-x86 %* + dotnet msbuild /t:restore,package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net8.0 /p:RuntimeIdentifier=win-x64 %* + dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net8.0 /p:RuntimeIdentifier=win-arm64 %* + dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net8.0 /p:RuntimeIdentifier=win-x86 %* ) else ( echo *** All platforms - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net6.0 /p:RuntimeIdentifier=win10-x64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net6.0 /p:RuntimeIdentifier=win10-arm64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net6.0 /p:RuntimeIdentifier=win10-x86 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=osx-x64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=debian.10-x64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=ubuntu.18.04-x64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=ubuntu.18.04-arm64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=ubuntu.20.04-x64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=ubuntu.20.04-arm64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=opensuse.15.0-x64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=fedora.34-x64 %* - dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=centos.9-x64 %* + dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net8.0 /p:RuntimeIdentifier=win-x64 %* + dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net8.0 /p:RuntimeIdentifier=win-arm64 %* + dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=true /p:TargetFramework=net8.0 /p:RuntimeIdentifier=win-x86 %* + dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net8.0 /p:RuntimeIdentifier=osx-x64 %* + dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net8.0 /p:RuntimeIdentifier=osx-arm64 %* + dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net8.0 /p:RuntimeIdentifier=linux-x64 %* + dotnet msbuild /t:restore,Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net8.0 /p:RuntimeIdentifier=linux-arm64 %* ) if not errorlevel 0 exit /b 1 if %_DOCKER_BUILD% == "true" ( echo *** Building and packaging Unix/Linux Targets - docker run --rm -v %cd%:/build mcr.microsoft.com/dotnet/sdk:6.0 /build/package.sh %* + docker run --rm -v %cd%:/build mcr.microsoft.com/dotnet/sdk:8.0 /build/package.sh %* ) \ No newline at end of file diff --git a/package.sh b/package.sh index 8a0d897..9a89190 100755 --- a/package.sh +++ b/package.sh @@ -2,14 +2,8 @@ pushd "${0%/*}" > /dev/null if [ ! -z $BUILDVERSION ]; then _VersionProp="/p:VersionPrefix=$BUILDVERSION"; fi dotnet restore -dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=osx-x64 $_BuildProp $_VersionProp $@ -dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=debian.10-x64 $_BuildProp $_VersionProp $@ -dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=ubuntu.18.04-x64 $_BuildProp $_VersionProp $@ -dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=ubuntu.18.04-arm64 $_BuildProp $_VersionProp $@ -dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=ubuntu.20.04-x64 $_BuildProp $_VersionProp $@ -dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=ubuntu.20.04-arm64 $_BuildProp $_VersionProp $@ -dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=opensuse.15.0-x64 $_BuildProp $_VersionProp $@ -dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=fedora.34-x64 $_BuildProp $_VersionProp $@ -dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net6.0 /p:RuntimeIdentifier=centos.9-x64 $_BuildProp $_VersionProp $@ - +dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net8.0 /p:RuntimeIdentifier=osx-x64 $_BuildProp $_VersionProp $@ +dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net8.0 /p:RuntimeIdentifier=osx-arm64 $_BuildProp $_VersionProp $@ +dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net8.0 /p:RuntimeIdentifier=linux-x64 $_BuildProp $_VersionProp $@ +dotnet msbuild /t:Package /p:Configuration=Release /p:WindowsOnly=false /p:TargetFramework=net8.0 /p:RuntimeIdentifier=linux-arm64 $_BuildProp $_VersionProp $@ popd diff --git a/src/Microsoft.Azure.Relay.Bridge/Configuration/ConfigException.cs b/src/Microsoft.Azure.Relay.Bridge/Configuration/ConfigException.cs index e843bc5..db15ca5 100644 --- a/src/Microsoft.Azure.Relay.Bridge/Configuration/ConfigException.cs +++ b/src/Microsoft.Azure.Relay.Bridge/Configuration/ConfigException.cs @@ -25,6 +25,7 @@ public ConfigException(string fileName, string message, Exception innerException FileName = fileName; } + [Obsolete(DiagnosticId = "SYSLIB0051")] protected ConfigException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/Microsoft.Azure.Relay.Bridge/Microsoft.Azure.Relay.Bridge.csproj b/src/Microsoft.Azure.Relay.Bridge/Microsoft.Azure.Relay.Bridge.csproj index 2f36dee..4514223 100644 --- a/src/Microsoft.Azure.Relay.Bridge/Microsoft.Azure.Relay.Bridge.csproj +++ b/src/Microsoft.Azure.Relay.Bridge/Microsoft.Azure.Relay.Bridge.csproj @@ -2,7 +2,7 @@ true - win10-x64 + win-x64 @@ -13,7 +13,11 @@ - + + + + + @@ -53,7 +57,7 @@ - + diff --git a/src/azbridge-installer/azbridge-installer.wixproj b/src/azbridge-installer/azbridge-installer.wixproj index 6b74970..92d7fc4 100644 --- a/src/azbridge-installer/azbridge-installer.wixproj +++ b/src/azbridge-installer/azbridge-installer.wixproj @@ -1,6 +1,6 @@ - + Debug 3.10 @@ -82,7 +82,7 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + diff --git a/src/azbridge-installer/build.cmd b/src/azbridge-installer/build.cmd index 4653d4a..426d3f6 100644 --- a/src/azbridge-installer/build.cmd +++ b/src/azbridge-installer/build.cmd @@ -1 +1 @@ -msbuild /t:publish /p:AlreadyPublished=true /p:TargetFramework=net6.0 /p:Platform=x64 /p:Configuration=Debug /p:RuntimeIdentifier=win10-x64 +msbuild /t:publish /p:AlreadyPublished=true /p:TargetFramework=net8.0 /p:Platform=x64 /p:Configuration=Debug /p:RuntimeIdentifier=win-x64 diff --git a/src/azbridge-installer/packages.config b/src/azbridge-installer/packages.config index d5e41c6..f16d735 100644 --- a/src/azbridge-installer/packages.config +++ b/src/azbridge-installer/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/azbridge-installer/restore.cmd b/src/azbridge-installer/restore.cmd index 6a4e495..1a993a3 100644 --- a/src/azbridge-installer/restore.cmd +++ b/src/azbridge-installer/restore.cmd @@ -8,7 +8,7 @@ REM @echo off pushd "%~dp0" if not exist ".\.nuget" mkdir ".\.nuget" -if not exist ".\.nuget\nuget.exe" powershell -Command "Invoke-WebRequest https://www.nuget.org/nuget.exe -OutFile .\.nuget\nuget.exe" +if not exist ".\.nuget\nuget.exe" powershell -Command "Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile .\.nuget\nuget.exe" if not exist ".\.nuget\nuget.config" ( echo ^ > .\.nuget\nuget.config echo ^^ >> .\.nuget\nuget.config diff --git a/src/azbridge/azbridge.csproj b/src/azbridge/azbridge.csproj index bb27f17..86c3e86 100644 --- a/src/azbridge/azbridge.csproj +++ b/src/azbridge/azbridge.csproj @@ -5,12 +5,13 @@ true true false - win10-x64 + win-x64 true + @@ -67,7 +68,7 @@ /etc/profile.d/azbridge.sh - 0555 + 0555 @@ -104,15 +105,11 @@ - - + + - - - - true @@ -139,20 +136,20 @@ - + - + - + - + @@ -167,7 +164,7 @@ - + diff --git a/test/mysql/Test.proj b/test/mysql/Test.proj index 871ff6a..5e93aeb 100644 --- a/test/mysql/Test.proj +++ b/test/mysql/Test.proj @@ -2,7 +2,7 @@ None - debian.10-x64 + linux-x64 deb diff --git a/test/mysql/my.cnf b/test/mysql/my.cnf index 885a18d..a1337af 100644 --- a/test/mysql/my.cnf +++ b/test/mysql/my.cnf @@ -1,6 +1,7 @@ [mysqld] user=mysql default_authentication_plugin=mysql_native_password +connect_timeout=100 [mysql] user=mysql diff --git a/test/mysql/mysql.server.dockerfile b/test/mysql/mysql.server.dockerfile index 47a26aa..a4fdebc 100644 --- a/test/mysql/mysql.server.dockerfile +++ b/test/mysql/mysql.server.dockerfile @@ -1,4 +1,4 @@ -FROM mysql:5-debian AS build +FROM mysql:8.0-debian AS build ARG package_name COPY ./tmp/$package_name . RUN apt-get -qq update -y diff --git a/test/mysql/test.cmd b/test/mysql/test.cmd index 3e88ee2..614814b 100644 --- a/test/mysql/test.cmd +++ b/test/mysql/test.cmd @@ -10,11 +10,11 @@ if not "%~5" == "" set VersionSuffix=%~5 if not "%~6" == "" set TargetFramework=%~6 if "%Operation%"=="" set Operation=build -if "%ImageName%"=="" set ImageName=ubuntu.18.04-x64 +if "%ImageName%"=="" set ImageName=linux-x64 if "%ImageSuffix%"=="" set ImageSuffix=deb if "%VersionSuffix%"=="" set VersionSuffix=preview if "%VersionPrefix%"=="" set VersionPrefix=1.0.0 -if "%TargetFramework%"=="" set TargetFramework=net6.0 +if "%TargetFramework%"=="" set TargetFramework=net8.0 set PackageName=azbridge.%VersionPrefix%-%VersionSuffix%.%ImageName%.%ImageSuffix% pushd "%~dp0" diff --git a/test/mysql/test.sh b/test/mysql/test.sh old mode 100644 new mode 100755 index bded4f2..7568eaf --- a/test/mysql/test.sh +++ b/test/mysql/test.sh @@ -8,11 +8,11 @@ if [ ! -z $5 ]; then VersionSuffix=$5; fi if [ ! -z $6 ]; then TargetFramework=$6; fi if [ -z ${Operation+x} ]; then Operation='build'; fi -if [ -z ${ImageName+x} ]; then ImageName='ubuntu.20.04-x64'; fi +if [ -z ${ImageName+x} ]; then ImageName='linux-x64'; fi if [ -z ${ImageSuffix+x} ]; then VersionSuffix='deb'; fi if [ -z ${VersionSuffix+x} ]; then VersionSuffix='preview'; fi if [ -z ${VersionPrefix+x} ]; then VersionPrefix='1.0.0'; fi -if [ -z ${TargetFramework+x} ]; then TargetFramework='net6.0'; fi +if [ -z ${TargetFramework+x} ]; then TargetFramework='net8.0'; fi echo $@ @@ -52,8 +52,8 @@ else # start the web server server_name=$(docker run -v $(pwd):/tests -d -v $(pwd)/my.cnf:/etc/mysqld/conf.d/my.cnf --rm -d -e AZBRIDGE_TEST_CXNSTRING="$_CXNSTRING" -e MYSQL_ROOT_PASSWORD=PaSsWoRd112233 -e MYSQL_PASSWORD=PaSsWoRd112233 -e MYSQL_USER=mysql azbridge-mysql-server:latest) # wait for server to start - echo waiting 20 seconds - sleep 20 + echo waiting 60 seconds + sleep 60 # run the client docker run -v $(pwd):/tests -v $(pwd)/my.cnf:/home/mysql/.my.cnf --rm -i -e AZBRIDGE_TEST_CXNSTRING="$_CXNSTRING" azbridge-mysql-client:latest bash /tests/run_client.sh _RESULT=$? diff --git a/test/nginx/Test.proj b/test/nginx/Test.proj index 31f099d..690d276 100644 --- a/test/nginx/Test.proj +++ b/test/nginx/Test.proj @@ -2,6 +2,7 @@ None + osx-x64;osx-arm64;debian.10-x64;ubuntu.18.04-x64;ubuntu.18.04-arm64;ubuntu.20.04-x64;ubuntu.20.04-arm64;opensuse.15.0-x64;fedora.34-x64;centos.9-x64 @@ -10,15 +11,15 @@ tar.gz - + - + - + diff --git a/test/nginx/test.cmd b/test/nginx/test.cmd index bab5f36..1c91e72 100644 --- a/test/nginx/test.cmd +++ b/test/nginx/test.cmd @@ -10,11 +10,11 @@ if not "%~5" == "" set VersionSuffix=%~5 if not "%~6" == "" set TargetFramework=%~6 if "%Operation%"=="" set Operation=build -if "%ImageName%"=="" set ImageName=ubuntu.18.04-x64 +if "%ImageName%"=="" set ImageName=linux-x64 if "%ImageSuffix%"=="" set ImageSuffix=deb if "%VersionSuffix%"=="" set VersionSuffix=preview if "%VersionPrefix%"=="" set VersionPrefix=1.0.0 -if "%TargetFramework%"=="" set TargetFramework=net6.0 +if "%TargetFramework%"=="" set TargetFramework=net8.0 pushd "%~dp0" diff --git a/test/nginx/test.sh b/test/nginx/test.sh old mode 100644 new mode 100755 index ca59e4b..67d5359 --- a/test/nginx/test.sh +++ b/test/nginx/test.sh @@ -1,18 +1,20 @@ #!/bin/bash if [ ! -z $1 ]; then Operation=$1; fi -if [ ! -z $2 ]; then ImageName=$2; fi +if [ ! -z $2 ]; then DistroName=$2; fi if [ ! -z $3 ]; then ImageSuffix=$3; fi if [ ! -z $4 ]; then VersionPrefix=$4; fi if [ ! -z $5 ]; then VersionSuffix=$5; fi if [ ! -z $6 ]; then TargetFramework=$6; fi if [ -z ${Operation+x} ]; then Operation='build'; fi -if [ -z ${ImageName+x} ]; then ImageName='ubuntu.18.04-x64'; fi +if [ -z ${DistroName+x} ]; then DistroName='debian.10-x64'; fi if [ -z ${ImageSuffix+x} ]; then VersionSuffix='deb'; fi if [ -z ${VersionSuffix+x} ]; then VersionSuffix='preview'; fi if [ -z ${VersionPrefix+x} ]; then VersionPrefix='1.0.0'; fi -if [ -z ${TargetFramework+x} ]; then TargetFramework='net6.0'; fi +if [ -z ${TargetFramework+x} ]; then TargetFramework='net8.0'; fi + +ImageName='linux-x64' echo $@ @@ -23,14 +25,14 @@ if [ "${Operation}" == "build" ]; then if [ ! -d "tmp" ]; then mkdir tmp; fi cp ../../artifacts/build/$TargetFramework/$PackageName tmp/ > /dev/null - docker build -q -f $ImageName.server.dockerfile . --tag azbridge-nginx-server-$ImageName --build-arg package_name=$PackageName + docker build -f $DistroName.server.dockerfile . --tag azbridge-nginx-server-$ImageName --build-arg package_name=$PackageName _RESULT=$? if [ $_RESULT -ne 0 ]; then rm -rf tmp popd exit $_RESULT fi - docker build -q -f $ImageName.client.dockerfile . --tag azbridge-nginx-client-$ImageName --build-arg package_name=$PackageName + docker build -q -f $DistroName.client.dockerfile . --tag azbridge-nginx-client-$ImageName --build-arg package_name=$PackageName _RESULT=$? if [ $_RESULT -ne 0 ]; then rm -rf tmp diff --git a/test/node/Test.proj b/test/node/Test.proj index 401e5a0..098b7ec 100644 --- a/test/node/Test.proj +++ b/test/node/Test.proj @@ -5,8 +5,7 @@ - tar.gz - tar.gz + tar.gz zip diff --git a/test/node/test.cmd b/test/node/test.cmd index 20b128c..4e11668 100644 --- a/test/node/test.cmd +++ b/test/node/test.cmd @@ -10,11 +10,11 @@ if not "%~5" == "" set VersionSuffix=%~5 if not "%~6" == "" set TargetFramework=%~6 if "%Operation%"=="" set Operation=build -if "%ImageName%"=="" set ImageName=ubuntu.18.04-x64 +if "%ImageName%"=="" set ImageName=linux-x64 if "%ImageSuffix%"=="" set ImageSuffix=deb if "%VersionSuffix%"=="" set VersionSuffix=preview if "%VersionPrefix%"=="" set VersionPrefix=1.0.0 -if "%TargetFramework%"=="" set TargetFramework=net6.0 +if "%TargetFramework%"=="" set TargetFramework=net8.0 pushd "%~dp0" diff --git a/test/unit/Directory.Build.props b/test/unit/Directory.Build.props index 87231d5..78e4682 100644 --- a/test/unit/Directory.Build.props +++ b/test/unit/Directory.Build.props @@ -2,7 +2,7 @@ - net6.0 + net8.0 $(DeveloperBuildTestTfms) diff --git a/test/unit/Microsoft.Azure.Relay.Bridge.Tests/Microsoft.Azure.Relay.Bridge.Tests.csproj b/test/unit/Microsoft.Azure.Relay.Bridge.Tests/Microsoft.Azure.Relay.Bridge.Tests.csproj index 0efc07b..267e1ed 100644 --- a/test/unit/Microsoft.Azure.Relay.Bridge.Tests/Microsoft.Azure.Relay.Bridge.Tests.csproj +++ b/test/unit/Microsoft.Azure.Relay.Bridge.Tests/Microsoft.Azure.Relay.Bridge.Tests.csproj @@ -3,7 +3,7 @@ false Azure Relay Bridge Tests - win10-x64 + win-x64 diff --git a/verify-build.sh b/verify-build.sh index b54d45f..db65882 100755 --- a/verify-build.sh +++ b/verify-build.sh @@ -6,13 +6,13 @@ if [ -z $AZBRIDGE_TEST_CXNSTRING ]; then fi pushd test/mysql -dotnet msbuild /t:build /p:Configuration=Debug /p:TargetFramework=net6.0 $_BuildProp $_VersionProp $@ +dotnet msbuild /t:build /p:Configuration=Debug /p:TargetFramework=net8.0 $_BuildProp $_VersionProp $@ _RESULT=$? if [ $_RESULT -ne 0 ]; then popd exit $_RESULT fi -dotnet test --verbosity=normal /p:Configuration=Debug /p:TargetFramework=net6.0 $_BuildProp $_VersionProp $@ +dotnet test --verbosity=normal /p:Configuration=Debug /p:TargetFramework=net8.0 $_BuildProp $_VersionProp $@ _RESULT=$? if [ $_RESULT -ne 0 ]; then popd @@ -20,13 +20,13 @@ if [ $_RESULT -ne 0 ]; then fi popd pushd test/nginx -dotnet msbuild /t:clean,build /p:Configuration=Debug /p:TargetFramework=net6.0 $_BuildProp $_VersionProp $@ +dotnet msbuild /t:clean,build /p:Configuration=Debug /p:TargetFramework=net8.0 $_BuildProp $_VersionProp $@ _RESULT=$? if [ $_RESULT -ne 0 ]; then popd exit $_RESULT fi -dotnet test --verbosity=normal /p:Configuration=Debug /p:TargetFramework=net6.0 $_BuildProp $_VersionProp $@ +dotnet test --verbosity=normal /p:Configuration=Debug /p:TargetFramework=net8.0 $_BuildProp $_VersionProp $@ _RESULT=$? if [ $_RESULT -ne 0 ]; then popd diff --git a/version.props b/version.props index 13a6d52..31df306 100644 --- a/version.props +++ b/version.props @@ -3,7 +3,7 @@ 0 $(GITHUB_RUN_NUMBER) $(PATCHVERSION) - 0.6.$(RunNumber) + 0.9.$(RunNumber) $(PRODVERSION).$(RunNumber) rel $(VERSIONSUFFIX)