本文整理汇总了C#中Kudu.TestHarness.ApplicationManager.GitDeploy方法的典型用法代码示例。如果您正苦于以下问题:C# ApplicationManager.GitDeploy方法的具体用法?C# ApplicationManager.GitDeploy怎么用?C# ApplicationManager.GitDeploy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kudu.TestHarness.ApplicationManager
的用法示例。
在下文中一共展示了ApplicationManager.GitDeploy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoGitPush
private void DoGitPush(ApplicationManager appManager, TestRepository testRepository, string appName, string verificationContent)
{
appManager.GitDeploy(testRepository.PhysicalPath, "master");
var results = appManager.DeploymentManager.GetResultsAsync().Result.ToList();
if (results[0].Status != Kudu.Core.Deployment.DeployStatus.Success)
{
string msg = string.Format("Deployment of app {0} failed. Deployment count: {1} . Deployment Status: {2}", appName, results.Count, results[0].Status);
throw new ApplicationException(msg);
}
StressUtils.VerifySite(appManager.SiteUrl, verificationContent);
}
示例2: PushAndVerifyConsoleWorker
private void PushAndVerifyConsoleWorker(ApplicationManager appManager, TestRepository testRepository, string[] expectedVerificationFileLines, int expectedDeployments = 1)
{
appManager.GitDeploy(testRepository.PhysicalPath);
var results = appManager.DeploymentManager.GetResultsAsync().Result.ToList();
Assert.Equal(expectedDeployments, results.Count);
for (int i = 0; i < expectedDeployments; i++)
{
Assert.Equal(DeployStatus.Success, results[i].Status);
}
var expectedContinuousJob = new ContinuousJob()
{
Name = "deployedJob",
JobType = "continuous",
Status = "Running",
RunCommand = "ConsoleWorker.exe"
};
WaitUntilAssertVerified(
"verify continuous job",
TimeSpan.FromSeconds(60),
() =>
{
ContinuousJob deployedJob = appManager.JobsManager.GetContinuousJobAsync("deployedJob").Result;
AssertContinuousJob(expectedContinuousJob, deployedJob);
});
WaitUntilAssertVerified(
"verification file",
TimeSpan.FromSeconds(30),
() =>
{
VerifyVerificationFile(appManager, expectedVerificationFileLines);
});
}
示例3: GitDeployApp
private static void GitDeployApp(ApplicationManager hookAppManager, TestRepository hookAppRepository)
{
TestTracer.Trace("Deploy test app");
hookAppManager.GitDeploy(hookAppRepository.PhysicalPath);
var deploymentResults = hookAppManager.DeploymentManager.GetResultsAsync().Result.ToList();
Assert.Equal(1, deploymentResults.Count);
Assert.Equal(DeployStatus.Success, deploymentResults[0].Status);
}