-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeploymentOptions.cs
More file actions
46 lines (28 loc) · 1.21 KB
/
DeploymentOptions.cs
File metadata and controls
46 lines (28 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
namespace ConfigDeploy;
public sealed class DeploymentOptions
{
public const string SectionName = "ConfigDeploy";
public string CacheDirectory { get; set; } = Path.Combine(AppContext.BaseDirectory, "cache");
public int PollIntervalSeconds { get; set; } = 60;
public int GitTimeoutSeconds { get; set; } = 300;
public List<RepositoryDeployment> Repositories { get; set; } = [];
}
public sealed class RepositoryDeployment
{
public string Name { get; set; } = string.Empty;
public string RepositoryUrl { get; set; } = string.Empty;
public string Branch { get; set; } = "main";
public string DestinationPath { get; set; } = string.Empty;
public bool Enabled { get; set; } = true;
public bool RedeployWhenCommitUnchanged { get; set; } = true;
public GitCredentialOptions? Credentials { get; set; }
}
public sealed class GitCredentialOptions
{
public string? Username { get; set; }
public string? Password { get; set; }
public string? PersonalAccessToken { get; set; }
public string? UsernameEnvironmentVariable { get; set; }
public string? PasswordEnvironmentVariable { get; set; }
public string? PersonalAccessTokenEnvironmentVariable { get; set; }
}