public async Task <TaskAgent> AddAgentAsync(AgentSettings agentSettings, TaskAgent agent, CommandSettings command) { var deploymentMachine = new DeploymentMachine() { Agent = agent }; deploymentMachine = await _deploymentGroupServer.AddDeploymentTargetAsync(new Guid(agentSettings.ProjectId), agentSettings.DeploymentGroupId, deploymentMachine); await GetAndAddTags(deploymentMachine, agentSettings, command); return(deploymentMachine.Agent); }
public virtual async Task <TaskAgent> AddAgentAsync(AgentSettings agentSettings, TaskAgent agent, CommandSettings command) { var deploymentMachine = new DeploymentMachine() { Agent = agent }; var azureSubscriptionId = await GetAzureSubscriptionIdAsync(); if (!String.IsNullOrEmpty(azureSubscriptionId)) { deploymentMachine.Properties.Add("AzureSubscriptionId", azureSubscriptionId); } deploymentMachine = await _deploymentGroupServer.AddDeploymentTargetAsync(new Guid(agentSettings.ProjectId), agentSettings.DeploymentGroupId, deploymentMachine); await GetAndAddTags(deploymentMachine, agentSettings, command); return(deploymentMachine.Agent); }