-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Events will ignore exceptions
- Loading branch information
Showing
4 changed files
with
55 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Restart 'P3D Legacy Server'" | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
restart: | ||
name: "Restart 'P3D Legacy Server'" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
port: ${{ secrets.PORT }} | ||
script: | | ||
docker service update --force p3dlegacyserver_p3d_legacy_server; | ||
- name: Checkout Repository | ||
if: always() | ||
uses: actions/checkout@v4 | ||
|
||
- name: Notify | ||
if: always() | ||
env: | ||
BUILD_STATUS: ${{ job.status }} | ||
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_QA }} | ||
run: bash ./.github/workflows/discord.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
using Aragas.Extensions.Options.FluentValidation.Extensions; | ||
|
||
using FluentValidation; | ||
using OpenTelemetry.Exporter; | ||
|
||
namespace P3D.Legacy.Server.Options | ||
{ | ||
public sealed class OtlpOptionsValidator : AbstractValidator<OtlpOptions> | ||
{ | ||
public OtlpOptionsValidator() | ||
{ | ||
RuleFor(static x => x.Host).IsUri().IsUrlTcpEndpointAvailable().When(static x => x.Enabled); | ||
RuleFor(static x => x.LoggingEndpoint).IsUri().IsUrlTcpEndpointAvailable().When(static x => !string.IsNullOrEmpty(x.LoggingEndpoint)); | ||
RuleFor(static x => x.TracingEndpoint).IsUri().IsUrlTcpEndpointAvailable().When(static x => !string.IsNullOrEmpty(x.TracingEndpoint)); | ||
RuleFor(static x => x.MetricsEndpoint).IsUri().IsUrlTcpEndpointAvailable().When(static x => !string.IsNullOrEmpty(x.MetricsEndpoint)); | ||
} | ||
} | ||
|
||
public sealed record OtlpOptions | ||
{ | ||
public required bool Enabled { get; init; } = default!; | ||
public required string Host { get; init; } = default!; | ||
public required string LoggingEndpoint { get; init; } = default!; | ||
public required OtlpExportProtocol LoggingProtocol { get; init; } = default!; | ||
public required string TracingEndpoint { get; init; } = default!; | ||
public required OtlpExportProtocol TracingProtocol { get; init; } = default!; | ||
public required string MetricsEndpoint { get; init; } = default!; | ||
public required OtlpExportProtocol MetricsProtocol { get; init; } = default!; | ||
} | ||
} |