Beispiel #1
0
        public static GitDeploymentResult GitDeploy(RemoteDeploymentManager deploymentManager, string kuduServiceUrl, string localRepoPath, string remoteRepoUrl, string localBranchName, string remoteBranchName, TimeSpan waitTimeout)
        {
            Stopwatch sw = null;

            var result = deploymentManager.WaitForDeployment(() =>
            {
                HttpUtils.WaitForSite(kuduServiceUrl);
                sw = Stopwatch.StartNew();
                Git.Push(localRepoPath, remoteRepoUrl, localBranchName, remoteBranchName);
                sw.Stop();
            },
            waitTimeout);

            return new GitDeploymentResult
            {
                PushResponseTime = sw.Elapsed,
                TotalResponseTime = result.Item1,
                TimedOut = !result.Item2
            };
        }