public virtual string SetDeploymentStatusProcess(string rootPath, string newStatus, string slot, string subscription, string serviceName)
{
if (!string.IsNullOrEmpty(subscription))
{
var globalComponents = GlobalComponents.Load(GlobalPathInfo.GlobalSettingsDirectory);
CurrentSubscription = globalComponents.Subscriptions.Values.First(
sub => sub.SubscriptionName == subscription);
}
string result = CheckDeployment(newStatus, serviceName, slot);
if (string.IsNullOrEmpty(result))
{
SetDeployment(newStatus, serviceName, slot);
var deploymentStatusCommand = new GetDeploymentStatus(Channel) { ShareChannel = ShareChannel, CurrentSubscription = CurrentSubscription };
deploymentStatusCommand.WaitForState(newStatus, rootPath, serviceName, slot, CurrentSubscription.SubscriptionName);
}
return result;
}