Fix SCUM generated run deployment flow
This commit is contained in:
@@ -24,6 +24,24 @@ func scumDeploymentTestPlugin() domain.GamePlugin {
|
||||
}
|
||||
}
|
||||
|
||||
func requireManualSCUMRuntimeBindings(plugin *domain.GamePlugin, profileKey string) {
|
||||
plugin.RuntimeProfiles.Discovery = []domain.RuntimeDiscoveryProbe{
|
||||
{Key: "steamcmd", Kind: "command.version", TargetKey: "steamcmd", Required: true},
|
||||
{Key: "scum-install", Kind: "file.exists", TargetKey: "server/install-root", Required: true, Platforms: []string{"windows"}},
|
||||
}
|
||||
plugin.RuntimeProfiles.DependencyProbes = []domain.RuntimeDependencyProbe{{Key: "steamcmd", Kind: "command.version", TargetKey: "steamcmd", Required: true, Platforms: []string{"windows"}}}
|
||||
plugin.RuntimeProfiles.LogSources = []domain.RuntimeLogSource{
|
||||
{Key: "scum-console-stdout", Kind: "process.stdout", TargetKey: "scum/server-process", StreamKey: "scum.console.stdout", CursorKind: "sequence", RetentionDays: 30},
|
||||
{Key: "scum-server-events", Kind: "file.tail", TargetKey: "logs/server", StreamKey: "scum.server", CursorKind: "fingerprint", RetentionDays: 90},
|
||||
}
|
||||
plugin.RuntimeProfiles.TransportProfiles = []domain.RuntimeTransportProfile{{Key: "server-files", Kind: "file", TargetKey: "server-root", Capabilities: []string{domain.JobCapabilityRemoteRunFilesRead, domain.JobCapabilityRemoteRunFilesWrite}}}
|
||||
for i := range plugin.RuntimeProfiles.LifecycleProfiles {
|
||||
if plugin.RuntimeProfiles.LifecycleProfiles[i].Key == profileKey {
|
||||
plugin.RuntimeProfiles.LifecycleProfiles[i].TransportKeys = []string{"server-files"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestSCUMDeploymentPlanSeparatesInstallAndAdopt(t *testing.T) {
|
||||
plugin := scumDeploymentTestPlugin()
|
||||
definition := domain.ServerDeploymentDefinition{Mode: domain.ServerDeploymentModeGuided, CreateInputs: map[string]string{"serverName": "Alpha", "gamePort": "7777", "queryPort": "27015", "maxPlayers": "64"}}
|
||||
|
||||
Reference in New Issue
Block a user