Compare commits

...

2 Commits

Author SHA1 Message Date
nicolas.dorier
8d3f5477a6
Remove appveyor 2021-12-27 14:48:22 +09:00
nicolas.dorier
9f8f087aeb
bump nbx to 6.0 2021-12-27 14:42:58 +09:00
16 changed files with 19 additions and 141 deletions

View File

@ -2,14 +2,14 @@ version: 2
jobs:
test:
docker:
- image: mcr.microsoft.com/dotnet/core/sdk:3.1.100
- image: mcr.microsoft.com/dotnet/sdk:6.0.101-bullseye-slim
steps:
- checkout
- run:
command: |
dotnet --info
dotnet build -c Release
dotnet test -c Release --no-build ./NBXplorer.Tests/NBXplorer.Tests.csproj --filter "Azure!=Azure&Broker!=RabbitMq" -v n < /dev/null
dotnet test -c Release --no-build ./NBXplorer.Tests/NBXplorer.Tests.csproj --filter "Azure!=Azure&Broker!=RabbitMq" -v n --logger "console;verbosity=normal" < /dev/null
# publish jobs require $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS defined
amd64:

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:3.1.413-bullseye AS builder
FROM mcr.microsoft.com/dotnet/sdk:6.0.101-bullseye-slim AS builder
WORKDIR /source
COPY NBXplorer/NBXplorer.csproj NBXplorer/NBXplorer.csproj
COPY NBXplorer.Client/NBXplorer.Client.csproj NBXplorer.Client/NBXplorer.Client.csproj
@ -8,7 +8,7 @@ COPY . .
RUN cd NBXplorer && \
dotnet publish --output /app/ --configuration Release
FROM mcr.microsoft.com/dotnet/aspnet:3.1.19-bullseye-slim
FROM mcr.microsoft.com/dotnet/6.0.1-bullseye-slim
WORKDIR /app
RUN mkdir /datadir

View File

@ -1,5 +1,5 @@
# Note that we are using buster rather than bulleyes. Somehow, raspberry pi 4 doesn't like bulleyes.
FROM mcr.microsoft.com/dotnet/sdk:3.1.413-buster AS builder
FROM mcr.microsoft.com/dotnet/sdk:6.0.101-bullseye-slim AS builder
WORKDIR /source
COPY NBXplorer/NBXplorer.csproj NBXplorer/NBXplorer.csproj
COPY NBXplorer.Client/NBXplorer.Client.csproj NBXplorer.Client/NBXplorer.Client.csproj
@ -10,7 +10,7 @@ RUN cd NBXplorer && \
dotnet publish --output /app/ --configuration Release
# Note that we are using buster rather than bulleyes. Somehow, raspberry pi 4 doesn't like bulleyes.
FROM mcr.microsoft.com/dotnet/aspnet:3.1.19-buster-slim-arm32v7
FROM mcr.microsoft.com/dotnet/aspnet:6.0.1-bullseye-slim-arm32v7
WORKDIR /datadir
WORKDIR /app

View File

@ -1,5 +1,5 @@
# This is a manifest image, will pull the image with the same arch as the builder machine
FROM mcr.microsoft.com/dotnet/sdk:3.1.413-bullseye AS builder
FROM mcr.microsoft.com/dotnet/sdk:6.0.101-bullseye-slim AS builder
WORKDIR /source
COPY NBXplorer/NBXplorer.csproj NBXplorer/NBXplorer.csproj
COPY NBXplorer.Client/NBXplorer.Client.csproj NBXplorer.Client/NBXplorer.Client.csproj
@ -10,7 +10,7 @@ RUN cd NBXplorer && \
dotnet publish --output /app/ --configuration Release
# Force the builder machine to take make an arm runtime image. This is fine as long as the builder does not run any program
FROM mcr.microsoft.com/dotnet/aspnet:3.1.19-bullseye-slim-arm64v8
FROM mcr.microsoft.com/dotnet/aspnet:6.0.1-bullseye-slim-arm64v8
WORKDIR /datadir
WORKDIR /app

View File

@ -12,7 +12,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/dgarage/NBXplorer</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<LangVersion>8.0</LangVersion>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>$(DefineConstants);NO_SPAN</DefineConstants>

View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp3.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">net6.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@ -216,8 +216,7 @@ namespace NBXplorer.Tests
{
get
{
var address = ((KestrelServer)(Host.Services.GetService(typeof(IServer)))).Features.Get<IServerAddressesFeature>().Addresses.FirstOrDefault();
var address = Host.ServerFeatures.Get<IServerAddressesFeature>().Addresses.FirstOrDefault();
return new Uri(address);
}
}

View File

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29318.209
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBXplorer", "NBXplorer\NBXplorer.csproj", "{9C18B7C4-8FA8-4DBC-8E11-2C7C302D4CD9}"
EndProject
@ -11,12 +11,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBXplorer.Client", "NBXplor
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFiles", "SolutionFiles", "{E5A765B1-3F91-4D13-9501-EED582AD2BDB}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
.circleci\config.yml = .circleci\config.yml
docker-compose.regtest.yml = docker-compose.regtest.yml
Dockerfile.linuxamd64 = Dockerfile.linuxamd64
Dockerfile.linuxarm32v7 = Dockerfile.linuxarm32v7
Dockerfile.linuxarm64v8 = Dockerfile.linuxarm64v8
docker-compose.regtest.yml = docker-compose.regtest.yml
EndProjectSection
EndProject
Global

View File

@ -25,10 +25,6 @@ namespace NBXplorer.ModelBinders
ValueProviderResult val = bindingContext.ValueProvider.GetValue(
bindingContext.ModelName);
if (val == null)
{
return Task.CompletedTask;
}
string key = val.FirstValue as string;
if (key == null)

View File

@ -25,10 +25,6 @@ namespace NBXplorer.ModelBinders
ValueProviderResult val = bindingContext.ValueProvider.GetValue(
bindingContext.ModelName);
if(val == null)
{
return Task.CompletedTask;
}
string key = val.FirstValue as string;
if(key == null)

View File

@ -26,10 +26,6 @@ namespace NBXplorer.ModelBinders
ValueProviderResult val = bindingContext.ValueProvider.GetValue(
bindingContext.ModelName);
if(val == null)
{
return Task.CompletedTask;
}
string key = val.FirstValue as string;
if(key == null)

View File

@ -22,10 +22,6 @@ namespace NBXplorer.ModelBinders
ValueProviderResult val = bindingContext.ValueProvider.GetValue(
bindingContext.ModelName);
if (val == null)
{
return Task.CompletedTask;
}
string key = val.FirstValue as string;
if (key == null)

View File

@ -19,10 +19,6 @@ namespace NBXplorer.ModelBinders
ValueProviderResult val = bindingContext.ValueProvider.GetValue(
bindingContext.ModelName);
if(val == null)
{
return Task.CompletedTask;
}
string key = val.FirstValue as string;
if(key == null)
@ -51,10 +47,6 @@ namespace NBXplorer.ModelBinders
ValueProviderResult val = bindingContext.ValueProvider.GetValue(
bindingContext.ModelName);
if(val == null)
{
return Task.CompletedTask;
}
string key = val.FirstValue as string;
if(key == null)

View File

@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp3.1</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">net6.0</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFramework>
<Version>2.2.18</Version>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\NBXplorer.xml</DocumentationFile>
<NoWarn>1701;1702;1705;1591;CS1591</NoWarn>
<LangVersion>8.0</LangVersion>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<None Remove="banlist.cli.txt" />
@ -14,16 +14,6 @@
<ItemGroup>
<EmbeddedResource Include="banlist.cli.txt" />
</ItemGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<DefineConstants>$(DefineConstants);NETCOREAPP21</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.19" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.9" />
<Compile Remove="HealthChecks\**"></Compile>
</ItemGroup>
<ItemGroup>
<PackageReference Include="DBTrie" Version="1.0.39" />
@ -31,6 +21,7 @@
<PackageReference Include="RabbitMQ.Client" Version="5.1.2" />
<PackageReference Include="NicolasDorier.CommandLine" Version="1.0.0.2" />
<PackageReference Include="NicolasDorier.CommandLine.Configuration" Version="1.0.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.1"></PackageReference>
<ProjectReference Include="..\NBXplorer.Client\NBXplorer.Client.csproj" />
</ItemGroup>
<ItemGroup>

View File

@ -1,5 +1,5 @@
[![NuGet](https://img.shields.io/nuget/v/NBxplorer.Client.svg)](https://www.nuget.org/packages/NBxplorer.Client) [![Docker Automated buil](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg)](https://hub.docker.com/r/nicolasdorier/nbxplorer/)
[![Build status](https://ci.appveyor.com/api/projects/status/c7kqj7a3nf7vmhsk?svg=true)](https://ci.appveyor.com/project/NicolasDorier/nbxplorer)[![CircleCI](https://circleci.com/gh/dgarage/NBXplorer.svg?style=svg)](https://circleci.com/gh/dgarage/NBXplorer)
[![CircleCI](https://circleci.com/gh/dgarage/NBXplorer.svg?style=svg)](https://circleci.com/gh/dgarage/NBXplorer)
# NBXplorer

View File

@ -1,88 +0,0 @@
# reference: https://www.appveyor.com/docs/appveyor-yml/
# you can use {branch} name in version format too
# version: 1.0.{build}-{branch}
version: 1.1.0.{build}
pull_requests:
do_not_increment_build_number: true
skip_tags: true
# branches to build
branches:
# whitelist
only:
- master
#---------------------------------#
# environment configuration #
#---------------------------------#
image: Visual Studio 2019
clone_folder: c:\projects\nbxplorer
clone_depth: 1
configuration:
- Release
init:
- ps: dotnet --info
#---------------------------------#
# build configuration #
#---------------------------------#
before_build:
- ps: Write-Host "[$env:configuration] STARTED RabbitMq" -foregroundcolor "magenta"
- cmd: where docker
- cmd: docker version && docker-compose version
- cmd: docker-compose -f docker-compose.regtest.yml up -d rabbitmq
- ps: |
Write-Host "[$env:configuration] STARTED dotnet restore" -foregroundcolor "magenta"
dotnet nuget locals all --clear
dotnet restore -v diag -p:DisableImplicitNuGetFallbackFolder=true
Write-Host "[$env:configuration] FINISHED dotnet restore" -foregroundcolor "magenta"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
build_script:
- ps: |
Write-Host "[$env:configuration] STARTED dotnet build" -foregroundcolor "magenta"
dotnet msbuild /p:Configuration=$env:configuration /p:Version=$env:APPVEYOR_BUILD_VERSION
Write-Host "[$env:configuration] FINISHED dotnet build" -foregroundcolor "magenta"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# scripts to run after build
after_build:
- ps: |
if($env:configuration -eq 'Release')
{
Write-Host "[$env:configuration] STARTED dotnet pack" -foregroundcolor "magenta"
cd NBXplorer.Client
dotnet pack -c $env:configuration -v m --no-build -o $env:APPVEYOR_BUILD_FOLDER\nuget\
Write-Host "[$env:configuration] FINISHED dotnet pack" -foregroundcolor "magenta"
}
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
test_script:
- ps: |
Write-Host "[$env:configuration] STARTED dotnet test" -foregroundcolor "magenta"
cd $env:APPVEYOR_BUILD_FOLDER
dotnet test -c Release ./NBXplorer.Tests/NBXplorer.Tests.csproj --filter "Azure!=Azure" --logger:"console;noprogress=true"
Write-Host "[$env:configuration] FINISHED dotnet test" -foregroundcolor "magenta"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
#---------------------------------#
#---------------------------------#
# artifacts configuration #
#---------------------------------#
# pushing all files in build directory recursively
artifacts:
- path: nuget\*.nupkg
name: nuget packages