mirror of
https://github.com/actions/runner.git
synced 2025-12-16 23:20:03 +00:00
Runner register labels during configuration (#130)
* Runners will add os and architecture labels during registration * support github.localhost for dev.
This commit is contained in:
committed by
Christopher Johnson
parent
2f261f2c31
commit
f5f14d4811
@@ -35,7 +35,6 @@ namespace GitHub.DistributedTask.WebApi
|
||||
this.PoolId = requestToBeCloned.PoolId;
|
||||
this.JobId = requestToBeCloned.JobId;
|
||||
this.JobName = requestToBeCloned.JobName;
|
||||
this.Demands = new List<Demand>(requestToBeCloned.Demands ?? new Demand[0]);
|
||||
this.LockToken = requestToBeCloned.LockToken;
|
||||
this.ExpectedDuration = requestToBeCloned.ExpectedDuration;
|
||||
this.OrchestrationId = requestToBeCloned.OrchestrationId;
|
||||
@@ -68,6 +67,11 @@ namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
this.AgentSpecification = new JObject(requestToBeCloned.AgentSpecification);
|
||||
}
|
||||
|
||||
if (requestToBeCloned.Labels != null)
|
||||
{
|
||||
this.Labels = new HashSet<string>(requestToBeCloned.Labels, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -229,6 +233,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Order = 16, EmitDefaultValue = false)]
|
||||
[Obsolete("No more demands, use labels", true)]
|
||||
public IList<Demand> Demands
|
||||
{
|
||||
get;
|
||||
@@ -386,6 +391,13 @@ namespace GitHub.DistributedTask.WebApi
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember(Order = 33, EmitDefaultValue = false)]
|
||||
public ISet<string> Labels
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
internal Guid? LockToken
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user