Bump the builder to dotnet 10.0
This commit is contained in:
parent
689dcc610e
commit
6ddcdedee8
4
.github/workflows/playwright.yml
vendored
4
.github/workflows/playwright.yml
vendored
@ -16,10 +16,10 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET 8
|
||||
- name: Setup .NET 10
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
dotnet-version: 10.0.x
|
||||
|
||||
- name: Build solution
|
||||
run: dotnet build --configuration Release
|
||||
|
||||
29
Dockerfile
29
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0.100-bookworm-slim AS builder
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS builder
|
||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
WORKDIR /source
|
||||
@ -9,27 +9,36 @@ ARG VERSION
|
||||
ARG GIT_COMMIT
|
||||
RUN cd PluginBuilder && dotnet publish -p:Version=${VERSION} -p:GitCommit=${GIT_COMMIT} --output /app/ --configuration ${CONFIGURATION_NAME}
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-bookworm-slim
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
ENV LANG en_US.UTF-8
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
ENV LANG=en_US.UTF-8
|
||||
WORKDIR /datadir
|
||||
WORKDIR /app
|
||||
ENV PB_DATADIR=/datadir
|
||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
VOLUME /datadir
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install curl
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install apt-transport-https ca-certificates curl gnupg lsb-release --no-install-recommends \
|
||||
&& apt-get -y -qq install apt-transport-https ca-certificates curl gnupg lsb-release --no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install docker
|
||||
RUN curl -o cli.deb https://download.docker.com/linux/debian/dists/bookworm/pool/stable/amd64/docker-ce-cli_24.0.7-1~debian.12~bookworm_amd64.deb && \
|
||||
curl -o buildx.deb https://download.docker.com/linux/debian/dists/bookworm/pool/stable/amd64/docker-buildx-plugin_0.11.2-1~debian.12~bookworm_amd64.deb && \
|
||||
dpkg -i cli.deb buildx.deb && \
|
||||
rm cli.deb buildx.deb
|
||||
RUN install -m 0755 -d /etc/apt/keyrings && \
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
|
||||
gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
|
||||
chmod a+r /etc/apt/keyrings/docker.gpg && \
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
|
||||
https://download.docker.com/linux/ubuntu \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -y -qq install docker-ce-cli docker-buildx-plugin docker-compose-plugin \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder "/app" .
|
||||
ENTRYPOINT ["/app/PluginBuilder"]
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
@ -16,14 +16,14 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
|
||||
<PackageReference Include="Microsoft.Playwright.Xunit" Version="1.53.0"/>
|
||||
<PackageReference Include="xunit" Version="2.9.2"/>
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
|
||||
<PackageReference Include="Microsoft.Playwright.Xunit" Version="1.58.0" />
|
||||
<PackageReference Include="xunit" Version="2.9.3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
||||
<PackageReference Include="coverlet.collector" Version="8.0.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
||||
@ -105,18 +105,16 @@ public class ServerTester : IAsyncDisposable
|
||||
|
||||
Program host = new();
|
||||
var projectDir = FindPluginBuilderDirectory();
|
||||
|
||||
var webappBuilder = host.CreateWebApplicationBuilder(new WebApplicationOptions
|
||||
{
|
||||
ContentRootPath = projectDir,
|
||||
WebRootPath = Path.Combine(projectDir, "wwwroot"),
|
||||
Args = ["--urls=http://127.0.0.1:0"]
|
||||
});
|
||||
|
||||
// Inject configuration directly instead of using environment variables to avoid cross-test contamination
|
||||
webappBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
|
||||
{
|
||||
["POSTGRES"] = connStr,
|
||||
["STORAGE_CONNECTION_STRING"] = StorageConnectionString
|
||||
Args = [
|
||||
"--urls=http://127.0.0.1:0",
|
||||
$"--postgres={connStr}",
|
||||
$"--storage_connection_string={StorageConnectionString}",
|
||||
]
|
||||
});
|
||||
|
||||
webappBuilder.Services.AddHttpClient();
|
||||
|
||||
@ -84,7 +84,7 @@ public class AdminController(
|
||||
AdminPluginViewModel plugin = new()
|
||||
{
|
||||
PluginSlug = row.slug,
|
||||
Visibility = row.visibility,
|
||||
Visibility = Enum.Parse<PluginVisibilityEnum>((string)row.visibility, true),
|
||||
PrimaryOwnerEmail = row.email,
|
||||
HasPendingListingRequest = row.has_pending_request,
|
||||
PluginTitle = pluginSettings?.PluginTitle
|
||||
|
||||
@ -494,7 +494,7 @@ public class HomeController(
|
||||
IsAdmin = isAdmin,
|
||||
IsOwner = userId != null && userId == primaryOwnerId,
|
||||
PluginVersions = versions.ToList(),
|
||||
ShowHiddenNotice = (int)pluginDetails.visibility == (int)PluginVisibilityEnum.Hidden,
|
||||
ShowHiddenNotice = Enum.Parse<PluginVisibilityEnum>((string)pluginDetails.visibility, true) == PluginVisibilityEnum.Hidden,
|
||||
Contributors = pluginContributors,
|
||||
RatingFilter = model.RatingFilter,
|
||||
OwnerGithubUrl = ownerGithubUrl,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0
|
||||
|
||||
RUN apt-get update && apt-get install -y git jq openssh-client && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@ -8,12 +8,11 @@ USER dotnet
|
||||
|
||||
WORKDIR /build-tools
|
||||
ENV PLUGIN_PACKER_VERSION=https://github.com/btcpayserver/btcpayserver
|
||||
RUN git clone --depth 1 -b v2.0.0 --single-branch https://github.com/btcpayserver/btcpayserver && \
|
||||
RUN git clone --depth 1 -b v2.3.6-rc5 --single-branch https://github.com/btcpayserver/btcpayserver && \
|
||||
cd btcpayserver/BTCPayServer.PluginPacker && \
|
||||
dotnet build -c Release -o "/build-tools/PluginPacker" && \
|
||||
rm -rf /build-tools/btcpayserver
|
||||
|
||||
|
||||
WORKDIR /out
|
||||
WORKDIR /build
|
||||
COPY --chown=dotnet:dotnet entrypoint.sh /entrypoint.sh
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Version Condition="'$(Version)' != ''">$(Version)</Version>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
@ -14,24 +14,23 @@
|
||||
</AssemblyAttribute>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Dapper" Version="2.1.35"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="8.0.10"/>
|
||||
<PackageReference Include="MailKit" Version="4.8.0"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.10"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.10"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.10"/>
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
|
||||
<PackageReference Include="Dapper" Version="2.1.72" />
|
||||
<PackageReference Include="MailKit" Version="4.15.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="10.0.5" />
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.201">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NBitcoin" Version="9.0.1"/>
|
||||
<PackageReference Include="NBitcoin.Secp256k1" Version="3.1.6"/>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
|
||||
<PackageReference Include="Npgsql" Version="8.0.4"/>
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.8"/>
|
||||
<PackageReference Include="Serilog" Version="4.3.0"/>
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.2"/>
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0"/>
|
||||
<PackageReference Include="NBitcoin" Version="9.0.5" />
|
||||
<PackageReference Include="NBitcoin.Secp256k1" Version="3.2.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
<PackageReference Include="Npgsql" Version="10.0.2" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.1" />
|
||||
<PackageReference Include="Serilog" Version="4.3.1" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="10.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0"/>
|
||||
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3"/>
|
||||
</ItemGroup>
|
||||
|
||||
@ -249,11 +249,14 @@ public class Program
|
||||
.Tag(CacheTags.Plugins));
|
||||
});
|
||||
|
||||
var dataSourceBuilder = new NpgsqlDataSourceBuilder(configuration.GetRequired("POSTGRES"));
|
||||
dataSourceBuilder.MapEnum<PluginVisibilityEnum>("plugin_visibility_enum");
|
||||
var dataSource = dataSourceBuilder.Build();
|
||||
|
||||
services.AddDbContext<IdentityDbContext<IdentityUser>>(b =>
|
||||
{
|
||||
b.UseNpgsql(configuration.GetRequired("POSTGRES"));
|
||||
b.UseNpgsql(dataSource);
|
||||
});
|
||||
NpgsqlConnection.GlobalTypeMapper.MapEnum<PluginVisibilityEnum>("plugin_visibility_enum");
|
||||
|
||||
services.AddIdentity<IdentityUser, IdentityRole>(options =>
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user