From 94b788a47b7cac9e3c5763743cc41473566c770b Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Tue, 30 Jan 2024 18:12:50 -0700 Subject: [PATCH] Downgrade to net6.0 and add yml --- Server.Tests/Barcode.Host.Server.Tests.csproj | 8 +-- Server/Barcode.Host.Server.csproj | 8 +-- Shared/Barcode.Host.Shared.csproj | 4 +- azure-pipelines-server.yml | 58 +++++++++++++++++++ 4 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 azure-pipelines-server.yml diff --git a/Server.Tests/Barcode.Host.Server.Tests.csproj b/Server.Tests/Barcode.Host.Server.Tests.csproj index 80ceb5f..667fc9c 100644 --- a/Server.Tests/Barcode.Host.Server.Tests.csproj +++ b/Server.Tests/Barcode.Host.Server.Tests.csproj @@ -3,7 +3,7 @@ enable enable win-x64;linux-x64 - net8.0 + net6.0 02dce973-df1d-4325-962a-ed549af8d4c5 @@ -31,10 +31,10 @@ - + - - + + diff --git a/Server/Barcode.Host.Server.csproj b/Server/Barcode.Host.Server.csproj index d0d3402..2e22521 100644 --- a/Server/Barcode.Host.Server.csproj +++ b/Server/Barcode.Host.Server.csproj @@ -4,7 +4,7 @@ enable Exe win-x64;linux-x64 - net8.0 + net6.0 02dce973-df1d-4325-962a-ed549af8d4c5 @@ -22,15 +22,15 @@ Linux - - + + - + diff --git a/Shared/Barcode.Host.Shared.csproj b/Shared/Barcode.Host.Shared.csproj index 691951b..802a378 100644 --- a/Shared/Barcode.Host.Shared.csproj +++ b/Shared/Barcode.Host.Shared.csproj @@ -3,7 +3,7 @@ enable enable win-x64;linux-x64 - net7.0 + net6.0 true @@ -20,7 +20,7 @@ Linux - + diff --git a/azure-pipelines-server.yml b/azure-pipelines-server.yml new file mode 100644 index 0000000..93aaaa2 --- /dev/null +++ b/azure-pipelines-server.yml @@ -0,0 +1,58 @@ +trigger: + branches: + include: + - red-hat + paths: + include: + - "Server/*" + - "Shared/*" + - "Server.Tests/*" + exclude: + - ".vscode/*" + - "JavaScript/*" + - "SignalRChat/*" + - "**/*.yml" + +variables: + BuildConfiguration: "Release" + ASPNETCORE_ENVIRONMENT: "Production" + +stages: + - stage: auclv0558 + displayName: auclv0558 + pool: + name: open-insight-metrology-viewer + demands: barcode-host-auclv0558 + jobs: + - job: auclv0558 + steps: + - script: | + echo $(Build.BuildId) + echo $(Build.Reason) + echo $(Build.Repository.Id) + echo $(Build.Repository.Name) + echo $(Build.SourceVersion) + displayName: "Echo Check" + + - script: "dotnet nuget locals all --clear" + displayName: "Nuget Clear" + enabled: false + + - script: | + dotnet user-secrets init + dotnet user-secrets set "BuildNumber" "$(Build.BuildId)" + dotnet user-secrets set "BuildSourceVersion" "$(Build.SourceVersion)" + dotnet user-secrets list + workingDirectory: Server + displayName: "Safe storage of app secrets - Server" + + - script: "dotnet build --configuration $(BuildConfiguration)" + workingDirectory: Server + displayName: "Core Build - Server" + + - script: "dotnet publish --configuration $(BuildConfiguration) --output ~/Barcode-Host-$(Build.SourceVersion)-$(Build.BuildId)-$(BuildConfiguration)/Server" + workingDirectory: Server + displayName: "Core Publish - Server" + + - script: "echo ln -s /home/$USER/Barcode-Host-$(Build.SourceVersion)-$(Build.BuildId)-$(BuildConfiguration)/Server /var/www/Barcode-Host/Server" + displayName: "Echo Symbolic Link Command" \ No newline at end of file