This commit is contained in:
Chris Cheetham 2022-03-29 11:36:42 -04:00
Родитель 77b6299724
Коммит 2e83d2fd34
6 изменённых файлов: 17 добавлений и 16 удалений

Просмотреть файл

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Просмотреть файл

@ -1,11 +1,11 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
WORKDIR /source
COPY . .
RUN dotnet restore
RUN dotnet publish -c release -o /srv --no-restore
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine
WORKDIR /srv
RUN apk add bash
RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > wait-for-it \

Просмотреть файл

@ -26,15 +26,15 @@ stages:
vmImage: ubuntu-latest
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core SDK 5.0'
displayName: 'Install .NET Core SDK 6.0'
inputs:
packageType: sdk
version: 5.0.x
- task: UseDotNet@2
displayName: 'Install .NET Core SDK 3.1'
inputs:
packageType: sdk
version: 3.1.x
version: 6.0.x
# - task: UseDotNet@2
# displayName: 'Install .NET Core SDK 3.1'
# inputs:
# packageType: sdk
# version: 3.1.x
# - task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
# displayName: Start SonarQube Analysis
# inputs:

Просмотреть файл

@ -1,6 +1,6 @@
{
"sdk": {
"version": "5.0.0",
"version": "6.0.0",
"rollForward": "latestFeature"
}
}

Просмотреть файл

@ -17,6 +17,7 @@ using Steeltoe.Management.Endpoint;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
namespace Steeltoe.InitializrService
{
@ -83,7 +84,7 @@ namespace Steeltoe.InitializrService
services.AddGoogleAnalyticsTracker(trackerOptions => { trackerOptions.TrackerId = "UA-114912118-2"; });
services.AddControllers().AddJsonOptions(jsonOptions =>
{
jsonOptions.JsonSerializerOptions.IgnoreNullValues = true;
jsonOptions.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
jsonOptions.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
});
}

Просмотреть файл

@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Net;
using System.Net.Http;
using FluentAssertions;
using Steeltoe.InitializrService.Config;
using Steeltoe.InitializrService.Utilities;
@ -18,12 +18,12 @@ namespace Steeltoe.InitializrService.Test.Integration
* ----------------------------------------------------------------- */
[Fact]
public void ProjectSpec_Should_Load_UI_Test_File()
public async void ProjectSpec_Should_Load_UI_Test_File()
{
var testFile =
new Uri("https://raw.githubusercontent.com/SteeltoeOSS/InitializrWeb/dev/start-client/dev/api.mock.json");
using var client = new WebClient();
var bits = client.DownloadString(testFile);
using var client = new HttpClient();
var bits = await client.GetStringAsync(testFile);
var uiConfig = Serializer.DeserializeJson<UiConfig>(bits);
uiConfig.SteeltoeVersion.Default.Should().Be("3.0.2");
uiConfig.DotNetFramework.Default.Should().Be("netcoreapp3.1");