Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release
- Suppress known Scriban 6.2.0 vulnerabilities pending upgrade
- SnsMessage: Token property was never populated from the constructor argument
- Added null guards for botMessageChannel and botReleaseMessageChannel parameters in BotService constructor
- Pass ILogger to HealthCheckClient.ExecuteAsync to match new API in Credfeto.Docker.HealthCheck.Http.Client 0.0.72.928
### Changed
- Dependencies - Updated NSubstitute.Analyzers.CSharp to 1.0.17
- Switched to use minimal APIs
Expand All @@ -43,7 +44,6 @@ Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release
- Dependencies - Updated xunit.analyzers to 1.27.0
- Dependencies - Updated xunit.v3 to 3.2.2
- Dependencies - Updated Serilog to 4.3.1
- Dependencies - Updated Credfeto.Docker.HealthCheck.Http.Client to 0.0.61.659
- Dependencies - Updated Figgle to 0.6.6
- Dependencies - Updated AWSSDK to 4.0.8.11
- Dependencies - Updated Discord.Net to 3.19.1
Expand All @@ -67,6 +67,7 @@ Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release
- Dependencies - Updated FunFair.Test.Common to 6.3.1.2342
- Dependencies - Updated FunFair.CodeAnalysis to 7.2.2.2066
- Dependencies - Updated Meziantou.Analyzer to 3.0.115
- Dependencies - Updated Credfeto.Docker.HealthCheck.Http.Client to 0.0.72.928
### Removed
### Deployment Changes
<!--
Expand Down
2 changes: 1 addition & 1 deletion src/BuildBot/BuildBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<ProjectReference Include="..\BuildBot.Watchtower\BuildBot.Watchtower.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Credfeto.Docker.HealthCheck.Http.Client" Version="0.0.61.659" />
<PackageReference Include="Credfeto.Docker.HealthCheck.Http.Client" Version="0.0.72.928" />
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="10.0.9" />
<PackageReference Include="Serilog" Version="4.3.1" />
Expand Down
16 changes: 13 additions & 3 deletions src/BuildBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using BuildBot.Helpers;
using Credfeto.Docker.HealthCheck.Http.Client;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Logging;

namespace BuildBot;

Expand All @@ -19,9 +20,18 @@ public static class Program
)]
public static async Task<int> Main(string[] args)
{
return HealthCheckClient.IsHealthCheck(args: args, out string? checkUrl)
? await HealthCheckClient.ExecuteAsync(targetUrl: checkUrl, cancellationToken: CancellationToken.None)
: await RunServerAsync(args);
if (HealthCheckClient.IsHealthCheck(args: args, out string? checkUrl))
{
using ILoggerFactory loggerFactory = LoggerFactory.Create(static builder => builder.AddConsole());
Comment thread
credfeto marked this conversation as resolved.

return await HealthCheckClient.ExecuteAsync(
targetUrl: checkUrl,
logger: loggerFactory.CreateLogger(nameof(Program)),
cancellationToken: CancellationToken.None
);
}

return await RunServerAsync(args);
}

private static async ValueTask<int> RunServerAsync(string[] args)
Expand Down
Loading