mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-07-21 21:13:05 +01:00
Suppress OD build output in CI
This commit is contained in:
@@ -230,18 +230,28 @@ namespace Tgstation.Server.Host.Components.Engine
|
||||
shortenedPath,
|
||||
$"run -c Release --project OpenDreamPackageTool -- --tgs -o {shortenedDeployPath}",
|
||||
null,
|
||||
true,
|
||||
true);
|
||||
!GeneralConfiguration.OpenDreamSuppressInstallOutput,
|
||||
!GeneralConfiguration.OpenDreamSuppressInstallOutput);
|
||||
using (cancellationToken.Register(() => buildProcess.Terminate()))
|
||||
buildExitCode = await buildProcess.Lifetime;
|
||||
|
||||
Logger.LogTrace("OD build complete, waiting for output...");
|
||||
string output;
|
||||
|
||||
if (!GeneralConfiguration.OpenDreamSuppressInstallOutput)
|
||||
{
|
||||
var buildOutputTask = buildProcess.GetCombinedOutput(cancellationToken);
|
||||
if (!buildOutputTask.IsCompleted)
|
||||
Logger.LogTrace("OD build complete, waiting for output...");
|
||||
output = await buildOutputTask;
|
||||
}
|
||||
else
|
||||
output = "<Build output suppressed by configuration due to not being immediately available>";
|
||||
|
||||
Logger.LogDebug(
|
||||
"OpenDream build exited with code {exitCode}:{newLine}{output}",
|
||||
buildExitCode,
|
||||
Environment.NewLine,
|
||||
await buildProcess.GetCombinedOutput(cancellationToken));
|
||||
output);
|
||||
},
|
||||
sourcePath,
|
||||
cancellationToken);
|
||||
|
||||
@@ -145,6 +145,11 @@ namespace Tgstation.Server.Host.Configuration
|
||||
/// </summary>
|
||||
public string OpenDreamGitTagPrefix { get; set; } = DefaultOpenDreamGitTagPrefix;
|
||||
|
||||
/// <summary>
|
||||
/// If the dotnet output of creating an OpenDream installation should be suppressed. Known to cause issues in CI.
|
||||
/// </summary>
|
||||
public bool OpenDreamSuppressInstallOutput { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GeneralConfiguration"/> class.
|
||||
/// </summary>
|
||||
|
||||
@@ -18,6 +18,7 @@ General:
|
||||
DeploymentDirectoryCopyTasksPerCore: 100 # Maximum number of concurrent file copy operations PER available CPU core
|
||||
OpenDreamGitUrl: https://github.com/OpenDreamProject/OpenDream # The repository to retrieve OpenDream from
|
||||
OpenDreamGitTagPrefix: v # The prefix to the OpenDream semver as tags appear in the git repository
|
||||
OpenDreamSuppressInstallOutput: false # Suppress the dotnet output of creating an OpenDream installation. Known to cause hangs in CI.
|
||||
Session:
|
||||
HighPriorityLiveDreamDaemon: false # If DreamDaemon instances should run as higher priority processes
|
||||
LowPriorityDeploymentProcesses: true # If TGS Deployments should run as lower priority processes
|
||||
|
||||
@@ -154,6 +154,7 @@ namespace Tgstation.Server.Tests.Live
|
||||
$"General:SkipAddingByondFirewallException={!TestingUtils.RunningInGitHubActions}",
|
||||
$"General:OpenDreamGitUrl={OpenDreamUrl}",
|
||||
$"Security:TokenExpiryMinutes=120", // timeouts are useless for us
|
||||
$"General:OpenDreamSuppressInstallOutput={TestingUtils.RunningInGitHubActions}",
|
||||
};
|
||||
|
||||
swarmArgs = new List<string>();
|
||||
|
||||
Reference in New Issue
Block a user