mirror of
https://github.com/actions/runner.git
synced 2025-12-11 12:57:05 +00:00
c
This commit is contained in:
committed by
TingluoHuang
parent
9b5eab9c81
commit
b37aa3254f
@@ -33,7 +33,7 @@ using GitHub.Services.WebApi;
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[ResourceArea(TaskResourceIds.AreaId)]
|
||||
public abstract class TaskAgentHttpClientBase : TaskAgentHttpClientCompatBase
|
||||
public abstract class TaskAgentHttpClientBase : VssHttpClientBase
|
||||
{
|
||||
public TaskAgentHttpClientBase(Uri baseUrl, VssCredentials credentials)
|
||||
: base(baseUrl, credentials)
|
||||
@@ -659,7 +659,6 @@ namespace GitHub.DistributedTask.WebApi
|
||||
string poolName = null,
|
||||
IEnumerable<string> properties = null,
|
||||
TaskAgentPoolType? poolType = null,
|
||||
TaskAgentPoolActionFilter? actionFilter = null,
|
||||
object userState = null,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
@@ -679,10 +678,6 @@ namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
queryParams.Add("poolType", poolType.Value.ToString());
|
||||
}
|
||||
if (actionFilter != null)
|
||||
{
|
||||
queryParams.Add("actionFilter", actionFilter.Value.ToString());
|
||||
}
|
||||
|
||||
return SendAsync<List<TaskAgentPool>>(
|
||||
httpMethod,
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
public enum EnableAccessTokenType
|
||||
{
|
||||
None,
|
||||
Variable,
|
||||
True = Variable,
|
||||
SecretVariable,
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class ExpressionValidationItem : ValidationItem
|
||||
{
|
||||
public ExpressionValidationItem()
|
||||
: base(InputValidationTypes.Expression)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class InputBindingContext
|
||||
{
|
||||
/// <summary>
|
||||
/// Value of the input
|
||||
/// </summary>
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public String Value
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class InputValidationItem : ValidationItem
|
||||
{
|
||||
public InputValidationItem()
|
||||
: base(InputValidationTypes.Input)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides binding context for the expression to evaluate
|
||||
/// </summary>
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public InputBindingContext Context
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
public class JobExecutionModeTypes
|
||||
{
|
||||
public const string Server = "Server";
|
||||
|
||||
public const string Agent = "Agent";
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an option that may affect the way an agent runs the job.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class JobOption : ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new <c>JobOption</c> with an empty collection of data.
|
||||
/// </summary>
|
||||
public JobOption()
|
||||
{
|
||||
}
|
||||
|
||||
private JobOption(JobOption optionToClone)
|
||||
{
|
||||
this.Id = optionToClone.Id;
|
||||
|
||||
if (optionToClone.m_data != null)
|
||||
{
|
||||
m_data = new Dictionary<String, String>(optionToClone.m_data, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the id of the option.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the data associated with the option.
|
||||
/// </summary>
|
||||
public IDictionary<String, String> Data
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_data == null)
|
||||
{
|
||||
m_data = new Dictionary<String, String>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
return m_data;
|
||||
}
|
||||
}
|
||||
|
||||
[OnDeserialized]
|
||||
private void OnDeserialized(StreamingContext context)
|
||||
{
|
||||
if (m_serializedData != null && m_serializedData.Count > 0)
|
||||
{
|
||||
m_data = new Dictionary<String, String>(m_serializedData, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
m_serializedData = null;
|
||||
}
|
||||
|
||||
[OnSerializing]
|
||||
private void OnSerializing(StreamingContext context)
|
||||
{
|
||||
m_serializedData = this.Data.Count > 0 ? this.Data : null;
|
||||
}
|
||||
|
||||
Object ICloneable.Clone()
|
||||
{
|
||||
return this.Clone();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a deep copy of the job option.
|
||||
/// </summary>
|
||||
/// <returns>A deep copy of the job option</returns>
|
||||
public JobOption Clone()
|
||||
{
|
||||
return new JobOption(this);
|
||||
}
|
||||
|
||||
private Dictionary<String, String> m_data;
|
||||
|
||||
[DataMember(Name = "Data", EmitDefaultValue = false)]
|
||||
private IDictionary<String, String> m_serializedData;
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,6 @@ namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
public static class JobRequestMessageTypes
|
||||
{
|
||||
public const String AgentJobRequest = "JobRequest";
|
||||
|
||||
public const String ServerJobRequest = "ServerJobRequest";
|
||||
|
||||
public const String ServerTaskRequest = "ServerTaskRequest";
|
||||
|
||||
public const String PipelineAgentJobRequest = "PipelineAgentJobRequest";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
/// <summary>
|
||||
/// Metrics columns header
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public sealed class MetricsColumnsHeader
|
||||
{
|
||||
/// <summary>
|
||||
/// Properties of deployment group for which metrics are provided.
|
||||
/// E.g. 1: LastJobStatus
|
||||
/// E.g. 2: TargetState
|
||||
/// </summary>
|
||||
public IList<MetricsColumnMetaData> Dimensions
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_dimensions == null)
|
||||
{
|
||||
m_dimensions = new List<MetricsColumnMetaData>();
|
||||
}
|
||||
|
||||
return m_dimensions;
|
||||
}
|
||||
internal set
|
||||
{
|
||||
m_dimensions = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The types of metrics.
|
||||
/// E.g. 1: total count of deployment targets.
|
||||
/// E.g. 2: Average time of deployment to the deployment targets.
|
||||
/// </summary>
|
||||
public IList<MetricsColumnMetaData> Metrics
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_metrics == null)
|
||||
{
|
||||
m_metrics = new List<MetricsColumnMetaData>();
|
||||
}
|
||||
|
||||
return m_metrics;
|
||||
}
|
||||
internal set
|
||||
{
|
||||
m_metrics = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Properties of deployment group for which metrics are provided.
|
||||
/// E.g. 1: LastJobStatus
|
||||
/// E.g. 2: TargetState
|
||||
/// </summary>
|
||||
[DataMember(Name = "Dimensions")]
|
||||
private IList<MetricsColumnMetaData> m_dimensions;
|
||||
|
||||
/// <summary>
|
||||
/// The types of metrics.
|
||||
/// E.g. 1: total count of deployment targets.
|
||||
/// E.g. 2: Average time of deployment to the deployment targets.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Metrics")]
|
||||
private IList<MetricsColumnMetaData> m_metrics;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Meta data for a metrics column.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public sealed class MetricsColumnMetaData
|
||||
{
|
||||
/// <summary>
|
||||
/// Name.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public String ColumnName
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data type.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public String ColumnValueType
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
/// <summary>
|
||||
/// Metrics row.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public sealed class MetricsRow
|
||||
{
|
||||
/// <summary>
|
||||
/// The values of the properties mentioned as 'Dimensions' in column header.
|
||||
/// E.g. 1: For a property 'LastJobStatus' - metrics will be provided for 'passed', 'failed', etc.
|
||||
/// E.g. 2: For a property 'TargetState' - metrics will be provided for 'online', 'offline' targets.
|
||||
/// </summary>
|
||||
public IList<String> Dimensions
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_dimensions == null)
|
||||
{
|
||||
m_dimensions = new List<String>();
|
||||
}
|
||||
|
||||
return m_dimensions;
|
||||
}
|
||||
internal set
|
||||
{
|
||||
m_dimensions = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metrics in serialized format.
|
||||
/// Should be deserialized based on the data type provided in header.
|
||||
/// </summary>
|
||||
public IList<String> Metrics
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_metrics == null)
|
||||
{
|
||||
m_metrics = new List<String>();
|
||||
}
|
||||
|
||||
return m_metrics;
|
||||
}
|
||||
internal set
|
||||
{
|
||||
m_metrics = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The values of the properties mentioned as 'Dimensions' in column header.
|
||||
/// E.g. 1: For a property 'LastJobStatus' - metrics will be provided for 'passed', 'failed', etc.
|
||||
/// E.g. 2: For a property 'TargetState' - metrics will be provided for 'online', 'offline' targets.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Dimensions")]
|
||||
private IList<String> m_dimensions;
|
||||
|
||||
/// <summary>
|
||||
/// Metrics in serialized format.
|
||||
/// Should be deserialized based on the data type provided in header.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Metrics")]
|
||||
private IList<String> m_metrics;
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[Flags]
|
||||
[DataContract]
|
||||
public enum PlanGroupStatus
|
||||
{
|
||||
[EnumMember]
|
||||
Running = 1,
|
||||
|
||||
[EnumMember]
|
||||
Queued = 2,
|
||||
|
||||
[EnumMember]
|
||||
All = Running | Queued
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
public enum PlanTemplateType
|
||||
{
|
||||
[DataMember]
|
||||
None = 0,
|
||||
|
||||
[DataMember]
|
||||
Designer = 1,
|
||||
|
||||
[DataMember]
|
||||
System = 2,
|
||||
|
||||
[DataMember]
|
||||
Yaml = 3,
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="ProjectReference.cs" company="Microsoft Corporation">
|
||||
// 2012-2023, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class ProjectReference
|
||||
{
|
||||
[DataMember]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -6,46 +6,12 @@ namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
public sealed class EndpointAuthorizationSchemes
|
||||
{
|
||||
public const String AzureStorage = "AzureStorage";
|
||||
public const String OAuth = "OAuth";
|
||||
public const String OAuth2 = "OAuth2";
|
||||
public const String OAuthWrap = "OAuthWrap";
|
||||
public const String Certificate = "Certificate";
|
||||
public const String UsernamePassword = "UsernamePassword";
|
||||
public const String Token = "Token";
|
||||
public const String PersonalAccessToken = "PersonalAccessToken";
|
||||
public const String ServicePrincipal = "ServicePrincipal";
|
||||
public const String None = "None";
|
||||
public const String Jwt = "JWT";
|
||||
public const String InstallationToken = "InstallationToken";
|
||||
}
|
||||
|
||||
public sealed class EndpointAuthorizationParameters
|
||||
{
|
||||
public const String Username = "Username";
|
||||
public const String Password = "Password";
|
||||
public const String Certificate = "Certificate";
|
||||
public const String AccessToken = "AccessToken";
|
||||
public const String ApiToken = "ApiToken";
|
||||
public const String RefreshToken = "RefreshToken";
|
||||
public const String ServicePrincipalId = "ServicePrincipalId";
|
||||
public const String ServicePrincipalKey = "ServicePrincipalKey";
|
||||
public const String TenantId = "TenantId";
|
||||
public const String RealmName = "RealmName";
|
||||
public const String IdToken = "IdToken";
|
||||
public const String Nonce = "nonce";
|
||||
public const String Scope = "Scope";
|
||||
public const String Role = "Role";
|
||||
public const String ServerCertThumbprint = "ServerCertThumbprint";
|
||||
public const String CompleteCallbackPayload = "CompleteCallbackPayload";
|
||||
public const String ClientMail = "ClientMail";
|
||||
public const String PrivateKey = "PrivateKey";
|
||||
public const String Issuer = "Issuer";
|
||||
public const String Audience = "Audience";
|
||||
public const String StorageAccountName = "StorageAccountName";
|
||||
public const String StorageAccessKey = "StorageAccessKey";
|
||||
public const String AccessTokenType = "AccessTokenType";
|
||||
public const String Signature = "Signature";
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
|
||||
@@ -21,47 +21,6 @@ namespace GitHub.DistributedTask.WebApi
|
||||
}
|
||||
}
|
||||
|
||||
public static void Copy<T>(
|
||||
ref IList<T> source,
|
||||
ref ISet<T> target,
|
||||
IEqualityComparer<T> comparer,
|
||||
Boolean clearSource = false)
|
||||
{
|
||||
if (source != null && source.Count > 0)
|
||||
{
|
||||
target = new HashSet<T>(source, comparer);
|
||||
}
|
||||
|
||||
if (clearSource)
|
||||
{
|
||||
source = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Copy<T>(
|
||||
ref ISet<T> source,
|
||||
ref IList<T> target,
|
||||
Boolean clearSource = false)
|
||||
{
|
||||
if (source != null && source.Count > 0)
|
||||
{
|
||||
target = new List<T>(source);
|
||||
}
|
||||
|
||||
if (clearSource)
|
||||
{
|
||||
source = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Copy<TKey, TValue>(
|
||||
ref Dictionary<TKey, TValue> source,
|
||||
ref Dictionary<TKey, TValue> target,
|
||||
Boolean clearSource = false)
|
||||
{
|
||||
Copy(ref source, ref target, EqualityComparer<TKey>.Default, clearSource);
|
||||
}
|
||||
|
||||
public static void Copy<TKey, TValue>(
|
||||
ref IDictionary<TKey, TValue> source,
|
||||
ref IDictionary<TKey, TValue> target,
|
||||
@@ -70,23 +29,6 @@ namespace GitHub.DistributedTask.WebApi
|
||||
Copy(ref source, ref target, EqualityComparer<TKey>.Default, clearSource);
|
||||
}
|
||||
|
||||
public static void Copy<TKey, TValue>(
|
||||
ref Dictionary<TKey, TValue> source,
|
||||
ref Dictionary<TKey, TValue> target,
|
||||
IEqualityComparer<TKey> comparer,
|
||||
Boolean clearSource = false)
|
||||
{
|
||||
if (source != null && source.Count > 0)
|
||||
{
|
||||
target = new Dictionary<TKey, TValue>(source, comparer);
|
||||
}
|
||||
|
||||
if (clearSource)
|
||||
{
|
||||
source = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Copy<TKey, TValue>(
|
||||
ref IDictionary<TKey, TValue> source,
|
||||
ref IDictionary<TKey, TValue> target,
|
||||
|
||||
@@ -45,47 +45,6 @@ namespace GitHub.DistributedTask.WebApi
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ValidateServiceEndpoint(ServiceEndpoint endpoint, ref string message)
|
||||
{
|
||||
if (endpoint == null)
|
||||
{
|
||||
message = "endpoint: null";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (endpoint.Id == Guid.Empty)
|
||||
{
|
||||
message = CommonResources.EmptyGuidNotAllowed("endpoint.Id");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(endpoint.Name))
|
||||
{
|
||||
message = string.Format("{0}:{1}", CommonResources.EmptyStringNotAllowed(), "endpoint.Name");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (endpoint.Url == null)
|
||||
{
|
||||
message = "endpoint.Url: null";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(endpoint.Type))
|
||||
{
|
||||
message = string.Format("{0}:{1}", CommonResources.EmptyStringNotAllowed(), "endpoint.Type");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (endpoint.Authorization == null)
|
||||
{
|
||||
message = "endpoint.Authorization: null";
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier of this endpoint.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
public static class ServiceEndpointTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// Azure endpoint
|
||||
/// </summary>
|
||||
public const String Azure = "Azure";
|
||||
|
||||
/// <summary>
|
||||
/// Chef endpoint
|
||||
/// </summary>
|
||||
public const String Chef = "Chef";
|
||||
|
||||
/// Chef endpoint
|
||||
/// </summary>
|
||||
public const String ExternalTfs = "ExternalTfs";
|
||||
|
||||
/// <summary>
|
||||
/// Generic endpoint
|
||||
/// </summary>
|
||||
public const String Generic = "Generic";
|
||||
|
||||
/// <summary>
|
||||
/// GitHub endpoint
|
||||
/// </summary>
|
||||
public const String GitHub = "GitHub";
|
||||
|
||||
/// <summary>
|
||||
/// GitHub Enterprise endpoint
|
||||
/// </summary>
|
||||
public const String GitHubEnterprise = "GitHubEnterprise";
|
||||
|
||||
/// <summary>
|
||||
/// Bitbucket endpoint
|
||||
/// </summary>
|
||||
public const String Bitbucket = "Bitbucket";
|
||||
|
||||
/// <summary>
|
||||
/// SSH endpoint
|
||||
/// </summary>
|
||||
public const String SSH = "SSH";
|
||||
|
||||
/// <summary>
|
||||
/// Subversion endpoint
|
||||
/// </summary>
|
||||
public const String Subversion = "Subversion";
|
||||
|
||||
/// <summary>
|
||||
///Gcp endpoint
|
||||
/// </summary>
|
||||
public const String Gcp = "google-cloud";
|
||||
|
||||
/// <summary>
|
||||
/// Subversion endpoint
|
||||
/// </summary>
|
||||
public const String Jenkins = "Jenkins";
|
||||
|
||||
/// <summary>
|
||||
/// External Git repository
|
||||
/// </summary>
|
||||
public const String ExternalGit = "Git";
|
||||
|
||||
/// <summary>
|
||||
/// Azure RM endpoint
|
||||
/// </summary>
|
||||
public const String AzureRM = "AzureRM";
|
||||
|
||||
/// <summary>
|
||||
/// Azure Deployment Manager
|
||||
/// </summary>
|
||||
public const String AzureDeploymentManager = "AzureDeploymentManager";
|
||||
|
||||
/// <summary>
|
||||
/// Azure Service Fabric
|
||||
/// </summary>
|
||||
public const String AzureServiceFabric = "ServiceFabric";
|
||||
|
||||
/// <summary>
|
||||
/// Azure Service Fabric
|
||||
/// </summary>
|
||||
public const String Docker = "dockerregistry";
|
||||
|
||||
/// <summary>
|
||||
/// Jira
|
||||
/// </summary>
|
||||
public const String Jira = "Jira";
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using GitHub.Services.FormInput;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class TaskAgentCloudType
|
||||
{
|
||||
|
||||
public TaskAgentCloudType()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of agent cloud type.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public String Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the display name of agnet cloud type.
|
||||
/// </summary>
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public String DisplayName { get; set; }
|
||||
|
||||
public List<InputDescriptor> InputDescriptors
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_inputDescriptors ?? (m_inputDescriptors = new List<InputDescriptor>());
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
m_inputDescriptors = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the input descriptors
|
||||
/// </summary>
|
||||
[DataMember(EmitDefaultValue = false, Name = "InputDescriptors")]
|
||||
private List<InputDescriptor> m_inputDescriptors;
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using GitHub.Services.Common;
|
||||
using GitHub.Services.WebApi;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[ResourceArea(TaskResourceIds.AreaId)]
|
||||
public abstract class TaskAgentHttpClientCompatBase : VssHttpClientBase
|
||||
{
|
||||
public TaskAgentHttpClientCompatBase(
|
||||
Uri baseUrl,
|
||||
VssCredentials credentials)
|
||||
: base(baseUrl, credentials)
|
||||
{
|
||||
}
|
||||
|
||||
public TaskAgentHttpClientCompatBase(
|
||||
Uri baseUrl,
|
||||
VssCredentials credentials,
|
||||
VssHttpRequestSettings settings)
|
||||
: base(baseUrl, credentials, settings)
|
||||
{
|
||||
}
|
||||
|
||||
public TaskAgentHttpClientCompatBase(
|
||||
Uri baseUrl,
|
||||
VssCredentials credentials,
|
||||
params DelegatingHandler[] handlers)
|
||||
: base(baseUrl, credentials, handlers)
|
||||
{
|
||||
}
|
||||
|
||||
public TaskAgentHttpClientCompatBase(
|
||||
Uri baseUrl,
|
||||
VssCredentials credentials,
|
||||
VssHttpRequestSettings settings,
|
||||
params DelegatingHandler[] handlers)
|
||||
: base(baseUrl, credentials, settings, handlers)
|
||||
{
|
||||
}
|
||||
|
||||
public TaskAgentHttpClientCompatBase(
|
||||
Uri baseUrl,
|
||||
HttpMessageHandler pipeline,
|
||||
Boolean disposeHandler)
|
||||
: base(baseUrl, pipeline, disposeHandler)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class TaskAgentJob
|
||||
{
|
||||
public TaskAgentJob(
|
||||
Guid id,
|
||||
String name,
|
||||
String container,
|
||||
IList<TaskAgentJobStep> steps,
|
||||
IDictionary<String, String> sidecarContainers,
|
||||
IList<TaskAgentJobVariable> variables)
|
||||
{
|
||||
this.Id = id;
|
||||
this.Name = name;
|
||||
this.Container = container;
|
||||
|
||||
m_variables = new List<TaskAgentJobVariable>(variables);
|
||||
m_steps = new List<TaskAgentJobStep>(steps);
|
||||
|
||||
if (sidecarContainers?.Count > 0)
|
||||
{
|
||||
m_sidecarContainers = new Dictionary<String, String>(sidecarContainers, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public Guid Id
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public String Name
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public String Container
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public IList<TaskAgentJobStep> Steps
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_steps == null)
|
||||
{
|
||||
m_steps = new List<TaskAgentJobStep>();
|
||||
}
|
||||
return m_steps;
|
||||
}
|
||||
}
|
||||
|
||||
public IDictionary<String, String> SidecarContainers
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_sidecarContainers == null)
|
||||
{
|
||||
m_sidecarContainers = new Dictionary<String, String>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
return m_sidecarContainers;
|
||||
}
|
||||
}
|
||||
|
||||
public IList<TaskAgentJobVariable> Variables
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_variables == null)
|
||||
{
|
||||
m_variables = new List<TaskAgentJobVariable>();
|
||||
}
|
||||
return m_variables;
|
||||
}
|
||||
}
|
||||
|
||||
[OnSerializing]
|
||||
private void OnSerializing(StreamingContext context)
|
||||
{
|
||||
if (m_sidecarContainers?.Count == 0)
|
||||
{
|
||||
m_sidecarContainers = null;
|
||||
}
|
||||
}
|
||||
|
||||
[DataMember(Name = "Steps", EmitDefaultValue = false)]
|
||||
private List<TaskAgentJobStep> m_steps;
|
||||
|
||||
[DataMember(Name = "SidecarContainers", EmitDefaultValue = false)]
|
||||
private IDictionary<String, String> m_sidecarContainers;
|
||||
|
||||
[DataMember(Name = "Variables", EmitDefaultValue = false)]
|
||||
private List<TaskAgentJobVariable> m_variables;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
/// <summary>
|
||||
/// This is useful in getting a list of deployment targets, filtered by the result of their last job.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
[DataContract]
|
||||
public enum TaskAgentJobResultFilter
|
||||
{
|
||||
/// <summary>
|
||||
/// Only those deployment targets on which last job failed (**Abandoned**, **Canceled**, **Failed**, **Skipped**).
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
Failed = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Only those deployment targets on which last job Passed (**Succeeded**, **Succeeded with issues**).
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
Passed = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Only those deployment targets that never executed a job.
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
NeverDeployed = 4,
|
||||
|
||||
/// <summary>
|
||||
/// All deployment targets.
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
All = Failed | Passed | NeverDeployed
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class TaskAgentJobStep
|
||||
{
|
||||
[DataContract]
|
||||
public enum TaskAgentJobStepType
|
||||
{
|
||||
[DataMember]
|
||||
Task = 1,
|
||||
|
||||
[DataMember]
|
||||
Action = 2
|
||||
}
|
||||
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public TaskAgentJobStepType Type
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public Guid Id
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public String Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public Boolean Enabled
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public String Condition
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public Boolean ContinueOnError
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public Int32 TimeoutInMinutes
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public TaskAgentJobTask Task
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public IDictionary<String, String> Env
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public IDictionary<String, String> Inputs
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class TaskAgentJobTask
|
||||
{
|
||||
[DataMember]
|
||||
public Guid Id
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public String Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public String Version
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class TaskAgentJobVariable
|
||||
{
|
||||
[DataMember]
|
||||
public String Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public String Value
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public Boolean Secret
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
/// <summary>
|
||||
/// Filters pools based on whether the calling user has permission to use or manage the pool.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
[DataContract]
|
||||
public enum TaskAgentPoolActionFilter
|
||||
{
|
||||
[EnumMember]
|
||||
None = 0,
|
||||
|
||||
[EnumMember]
|
||||
Manage = 2,
|
||||
|
||||
[EnumMember]
|
||||
Use = 16,
|
||||
}
|
||||
}
|
||||
@@ -12,12 +12,6 @@ namespace GitHub.DistributedTask.WebApi
|
||||
/// A typical pool of task agents
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
Automation = 1,
|
||||
|
||||
/// <summary>
|
||||
/// A deployment pool
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
Deployment = 2
|
||||
Automation = 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
/// <summary>
|
||||
/// This is useful in getting a list of deployment targets, filtered by the deployment agent status.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
[DataContract]
|
||||
public enum TaskAgentStatusFilter
|
||||
{
|
||||
/// <summary>
|
||||
/// Only deployment targets that are offline.
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
Offline = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Only deployment targets that are online.
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
Online = 2,
|
||||
|
||||
/// <summary>
|
||||
/// All deployment targets.
|
||||
/// </summary>
|
||||
[EnumMember]
|
||||
All = Offline | Online
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
[KnownType(typeof(ExpressionValidationItem))]
|
||||
[KnownType(typeof(InputValidationItem))]
|
||||
[JsonConverter(typeof(ValidationItemJsonConverter))]
|
||||
public class ValidationItem
|
||||
{
|
||||
protected ValidationItem(String type)
|
||||
{
|
||||
this.Type = type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Type of validation item
|
||||
/// </summary>
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public String Type
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Value to validate.
|
||||
/// The conditional expression to validate for the input for "expression" type
|
||||
/// Eg:eq(variables['Build.SourceBranch'], 'refs/heads/master');eq(value, 'refs/heads/master')
|
||||
/// </summary>
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public String Value
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tells whether the current input is valid or not
|
||||
/// </summary>
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public Boolean? IsValid
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reason for input validation failure
|
||||
/// </summary>
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public String Reason
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using GitHub.Services.WebApi;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
internal sealed class ValidationItemJsonConverter : VssSecureJsonConverter
|
||||
{
|
||||
public override Boolean CanConvert(Type objectType)
|
||||
{
|
||||
return typeof(ValidationItem).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
|
||||
}
|
||||
|
||||
public override Boolean CanWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override Object ReadJson(
|
||||
JsonReader reader,
|
||||
Type objectType,
|
||||
Object existingValue,
|
||||
JsonSerializer serializer)
|
||||
{
|
||||
if (reader.TokenType != JsonToken.StartObject)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Object newValue = null;
|
||||
|
||||
if (objectType == typeof(ExpressionValidationItem))
|
||||
{
|
||||
newValue = new ExpressionValidationItem();
|
||||
}
|
||||
else if (objectType == typeof(InputValidationItem))
|
||||
{
|
||||
newValue = new InputValidationItem();
|
||||
}
|
||||
|
||||
JObject value = JObject.Load(reader);
|
||||
|
||||
if (newValue == null)
|
||||
{
|
||||
var contract = serializer.ContractResolver.ResolveContract(objectType) as JsonObjectContract;
|
||||
if (contract == null)
|
||||
{
|
||||
return existingValue;
|
||||
}
|
||||
|
||||
JsonProperty property = contract.Properties.GetClosestMatchProperty("Type");
|
||||
if (property == null)
|
||||
{
|
||||
return existingValue;
|
||||
}
|
||||
|
||||
JToken itemTypeValue;
|
||||
String itemType = InputValidationTypes.Expression;
|
||||
if (value.TryGetValue(property.PropertyName, out itemTypeValue)
|
||||
&& itemTypeValue.Type == JTokenType.String)
|
||||
{
|
||||
itemType = (String)itemTypeValue;
|
||||
}
|
||||
|
||||
switch (itemType)
|
||||
{
|
||||
case InputValidationTypes.Expression:
|
||||
newValue = new ExpressionValidationItem();
|
||||
break;
|
||||
case InputValidationTypes.Input:
|
||||
newValue = new InputValidationItem();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
using (JsonReader objectReader = value.CreateReader())
|
||||
{
|
||||
serializer.Populate(objectReader, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
return newValue;
|
||||
}
|
||||
|
||||
public override void WriteJson(
|
||||
JsonWriter writer,
|
||||
Object value,
|
||||
JsonSerializer serializer)
|
||||
{
|
||||
// The virtual method returns false for CanWrite so this should never be invoked
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class InputValidationRequest
|
||||
{
|
||||
public IDictionary<String, ValidationItem> Inputs
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_inputs == null)
|
||||
{
|
||||
m_inputs = new Dictionary<String, ValidationItem>(StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
return m_inputs;
|
||||
}
|
||||
}
|
||||
|
||||
[DataMember(Name = "Inputs")]
|
||||
private Dictionary<String, ValidationItem> m_inputs;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
using GitHub.Services.Common;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[GenerateAllConstants]
|
||||
public static class InputValidationTypes
|
||||
{
|
||||
public const String Expression = "expression";
|
||||
public const String Input = "input";
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using GitHub.Services.WebApi;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility class to perform operations on Variable groups.
|
||||
/// </summary>
|
||||
public static class VariableGroupUtility
|
||||
{
|
||||
public static VariableValue Clone(this VariableValue value)
|
||||
{
|
||||
return new VariableValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,21 +13,9 @@ namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
public static class VariableUtility
|
||||
{
|
||||
public static EnableAccessTokenType GetEnableAccessTokenType(IDictionary<String, VariableValue> variables)
|
||||
public static VariableValue Clone(this VariableValue value)
|
||||
{
|
||||
EnableAccessTokenType type;
|
||||
if (variables != null &&
|
||||
variables.TryGetValue(WellKnownDistributedTaskVariables.EnableAccessToken, out VariableValue enableVariable) &&
|
||||
enableVariable != null)
|
||||
{
|
||||
Enum.TryParse(enableVariable.Value, true, out type);
|
||||
}
|
||||
else
|
||||
{
|
||||
type = EnableAccessTokenType.None;
|
||||
}
|
||||
|
||||
return type;
|
||||
return new VariableValue(value);
|
||||
}
|
||||
|
||||
public static Boolean IsVariable(String value)
|
||||
|
||||
@@ -4,50 +4,6 @@ namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
public static class WellKnownDistributedTaskVariables
|
||||
{
|
||||
public static readonly String AccessToken = "system.accessToken";
|
||||
public static readonly String AccessTokenScope = "system.connection.accessTokenScope";
|
||||
public static readonly String AzureUserAgent = "AZURE_HTTP_USER_AGENT";
|
||||
public static readonly String CollectionId = "system.collectionId";
|
||||
public static readonly String CollectionUrl = "system.collectionUri";
|
||||
public static readonly String Culture = "system.culture";
|
||||
public static readonly String DefinitionId = "system.definitionId";
|
||||
public static readonly String DefinitionName = "system.definitionName";
|
||||
public static readonly String EnableAccessToken = "system.enableAccessToken";
|
||||
public static readonly String HostType = "system.hosttype";
|
||||
public static readonly String HubVersion = "system.hubversion";
|
||||
public static readonly String IsScheduled = "system.isScheduled";
|
||||
public static readonly String JobAttempt = "system.jobAttempt";
|
||||
public static readonly String JobDisplayName = "system.jobDisplayName";
|
||||
public static readonly String JobId = "system.jobId";
|
||||
public static readonly String JobIdentifier = "system.jobIdentifier";
|
||||
public static readonly String JobName = "system.jobName";
|
||||
public static readonly String JobParallelismTag = "system.jobParallelismTag";
|
||||
public static readonly String JobPositionInPhase = "System.JobPositionInPhase";
|
||||
public static readonly String JobStatus = "system.jobStatus";
|
||||
public static readonly String MsDeployUserAgent = "MSDEPLOY_HTTP_USER_AGENT";
|
||||
public static readonly String ParallelExecutionType = "System.ParallelExecutionType";
|
||||
public static readonly String PhaseAttempt = "system.phaseAttempt";
|
||||
public static readonly String PhaseDisplayName = "system.phaseDisplayName";
|
||||
public static readonly String PhaseId = "system.phaseId";
|
||||
public static readonly String PhaseName = "system.phaseName";
|
||||
public static readonly String PipelineStartTime = "system.pipelineStartTime";
|
||||
public static readonly String PlanId = "system.planId";
|
||||
public static readonly String RestrictSecrets = "system.restrictSecrets";
|
||||
public static readonly String RetainDefaultEncoding = "agent.retainDefaultEncoding";
|
||||
public static readonly String ServerType = "system.servertype";
|
||||
public static readonly String StageAttempt = "system.stageAttempt";
|
||||
public static readonly String StageDisplayName = "system.stageDisplayName";
|
||||
public static readonly String StageId = "system.stageId";
|
||||
public static readonly String StageName = "system.stageName";
|
||||
public static readonly String System = "system";
|
||||
public static readonly String TFCollectionUrl = "system.teamFoundationCollectionUri";
|
||||
public static readonly String TaskDefinitionsUrl = "system.taskDefinitionsUri";
|
||||
public static readonly String TaskDisplayName = "system.taskDisplayName";
|
||||
public static readonly String TaskInstanceId = "system.taskInstanceId";
|
||||
public static readonly String TaskInstanceName = "system.taskInstanceName";
|
||||
public static readonly String TeamProject = "system.teamProject";
|
||||
public static readonly String TeamProjectId = "system.teamProjectId";
|
||||
public static readonly String TimelineId = "system.timelineId";
|
||||
public static readonly String TotalJobsInPhase = "System.TotalJobsInPhase";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
public static class WellKnownPackageTypes
|
||||
{
|
||||
public static readonly String Agent = "agent";
|
||||
}
|
||||
}
|
||||
@@ -160,7 +160,7 @@ namespace GitHub.Runner.Common.Tests.Listener
|
||||
{
|
||||
Body = "somebody1",
|
||||
MessageId = 4234,
|
||||
MessageType = JobRequestMessageTypes.AgentJobRequest
|
||||
MessageType = JobRequestMessageTypes.PipelineAgentJobRequest
|
||||
},
|
||||
new TaskAgentMessage
|
||||
{
|
||||
@@ -174,7 +174,7 @@ namespace GitHub.Runner.Common.Tests.Listener
|
||||
{
|
||||
Body = "somebody3",
|
||||
MessageId = 4236,
|
||||
MessageType = JobRequestMessageTypes.AgentJobRequest
|
||||
MessageType = JobRequestMessageTypes.PipelineAgentJobRequest
|
||||
}
|
||||
};
|
||||
var messages = new Queue<TaskAgentMessage>(arMessages);
|
||||
|
||||
Reference in New Issue
Block a user