-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDeploymentAction.cs
More file actions
62 lines (45 loc) · 2.21 KB
/
DeploymentAction.cs
File metadata and controls
62 lines (45 loc) · 2.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using Newtonsoft.Json;
using Octopus.Data.Model;
using Octopus.Server.Extensibility.HostServices.Model;
namespace Tests.RealLifeScenario.Entities
{
public class DeploymentAction
{
public DeploymentAction(string name, string actionType)
{
Id = Guid.NewGuid().ToString();
Container = new DeploymentActionContainer();
Name = name;
ActionType = actionType;
}
public string Id { get; set; }
public string Name { get; set; }
public string ActionType { get; set; }
[JsonProperty("WorkerPoolId")]
public WorkerPoolIdOrName? WorkerPoolIdOrName { get; set; }
public string? WorkerPoolVariable { get; set; }
public DeploymentActionContainer Container { get; set; }
[JsonIgnore]
public bool HasWorkerPoolSet => !string.IsNullOrWhiteSpace(WorkerPoolIdOrName?.Value) || !string.IsNullOrWhiteSpace(WorkerPoolVariable);
public bool IsDisabled { get; set; }
[JsonIgnore]
public bool Enabled => !IsDisabled;
public bool IsRequired { get; set; }
[JsonIgnore]
public bool CanBeUsedForProjectVersioning => true;
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Reuse)]
public ReferenceCollection<DeploymentEnvironmentIdOrName> Environments { get; } = new();
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Reuse)]
public ReferenceCollection<DeploymentEnvironmentIdOrName> ExcludedEnvironments { get; } = new();
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Reuse)]
public ReferenceCollection<ChannelIdOrName> Channels { get; } = new();
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Reuse)]
public ReferenceCollection<TagCanonicalIdOrName> TenantTags { get; } = new();
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Reuse)]
public PackageReferenceCollection Packages { get; } = new();
public DeploymentActionCondition Condition { get; set; }
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Reuse)]
public PropertiesDictionary Properties { get; } = new();
}
}