internal ApplicationManager(ISiteManager siteManager, Site site, string appName, ISettingsResolver settingsResolver) { _siteManager = siteManager; _site = site; _appName = appName; _settingsResolver = settingsResolver; SiteUrl = site.SiteUrl; ServiceUrl = site.ServiceUrl; DeploymentManager = new RemoteDeploymentManager(site.ServiceUrl + "deployments"); SettingsManager = new RemoteDeploymentSettingsManager(site.ServiceUrl + "settings"); LogStreamManager = new RemoteLogStreamManager(site.ServiceUrl + "logstream"); SSHKeyManager = new RemoteSSHKeyManager(site.ServiceUrl + "sshkey"); VfsManager = new RemoteVfsManager(site.ServiceUrl + "vfs"); VfsWebRootManager = new RemoteVfsManager(site.ServiceUrl + "vfs/site/wwwroot"); LiveScmVfsManager = new RemoteVfsManager(site.ServiceUrl + "scmvfs"); ZipManager = new RemoteZipManager(site.ServiceUrl + "zip"); CommandExecutor = new RemoteCommandExecutor(site.ServiceUrl + "command"); ProcessManager = new RemoteProcessManager(site.ServiceUrl + "diagnostics/processes"); WebHooksManager = new RemoteWebHooksManager(site.ServiceUrl + "hooks"); RepositoryManager = new RemoteRepositoryManager(site.ServiceUrl + "scm"); JobsManager = new RemoteJobsManager(site.ServiceUrl + "jobs"); var repositoryInfo = RepositoryManager.GetRepositoryInfo().Result; GitUrl = repositoryInfo.GitUrl.OriginalString; }
internal ApplicationManager(ISiteManager siteManager, Site site, string appName, ISettingsResolver settingsResolver) { _siteManager = siteManager; _site = site; _appName = appName; _settingsResolver = settingsResolver; // Always null in public Kudu, but makes the code more similar to private Kudu NetworkCredential credentials = null; SiteUrl = site.SiteUrl; ServiceUrl = site.ServiceUrl; DeploymentManager = new RemoteDeploymentManager(site.ServiceUrl + "deployments", credentials); SettingsManager = new RemoteDeploymentSettingsManager(site.ServiceUrl + "settings", credentials); LogStreamManager = new RemoteLogStreamManager(site.ServiceUrl + "logstream", credentials); SSHKeyManager = new RemoteSSHKeyManager(site.ServiceUrl + "sshkey", credentials); VfsManager = new RemoteVfsManager(site.ServiceUrl + "vfs", credentials); VfsWebRootManager = new RemoteVfsManager(site.ServiceUrl + "vfs/site/wwwroot", credentials); LiveScmVfsManager = new RemoteVfsManager(site.ServiceUrl + "scmvfs", credentials); ZipManager = new RemoteZipManager(site.ServiceUrl + "zip", credentials); RuntimeManager = new RemoteRuntimeManager(site.ServiceUrl + "diagnostics/runtime", credentials); CommandExecutor = new RemoteCommandExecutor(site.ServiceUrl + "command", credentials); ProcessManager = new RemoteProcessManager(site.ServiceUrl + "diagnostics/processes", credentials); WebHooksManager = new RemoteWebHooksManager(site.ServiceUrl + "hooks", credentials); RepositoryManager = new RemoteRepositoryManager(site.ServiceUrl + "scm", credentials); JobsManager = new RemoteJobsManager(site.ServiceUrl + "jobs", credentials); LogFilesManager = new RemoteLogFilesManager(site.ServiceUrl + "/api/logs", credentials); SiteExtensionManager = new RemoteSiteExtensionManager(site.ServiceUrl + "api", credentials); var repositoryInfo = RepositoryManager.GetRepositoryInfo().Result; GitUrl = repositoryInfo.GitUrl.OriginalString; }
public static GitDeploymentResult GitDeploy(RemoteDeploymentManager deploymentManager, string kuduServiceUrl, string localRepoPath, string remoteRepoUrl, string localBranchName, string remoteBranchName) { HttpUtils.WaitForSite(kuduServiceUrl); Stopwatch sw = Stopwatch.StartNew(); string trace = Git.Push(localRepoPath, remoteRepoUrl, localBranchName, remoteBranchName); sw.Stop(); return new GitDeploymentResult { GitTrace = trace, TotalResponseTime = sw.Elapsed }; }
public static RemoteDeploymentManager GetDeploymentManager(this IApplication application, ICredentials credentials) { var deploymentManager = new RemoteDeploymentManager(application.ServiceUrl + "deployments", credentials); return deploymentManager; }
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 }; }
public static GitDeploymentResult GitDeploy(string kuduServiceUrl, string localRepoPath, string remoteRepoUrl, string localBranchName, string remoteBranchName, TimeSpan waitTimeout) { var deploymentManager = new RemoteDeploymentManager(kuduServiceUrl); return GitDeploy(deploymentManager, kuduServiceUrl, localRepoPath, remoteRepoUrl, localBranchName, remoteBranchName, waitTimeout); }
public static GitDeploymentResult GitDeploy(string kuduServiceUrl, string localRepoPath, string remoteRepoUrl, string localBranchName, string remoteBranchName) { var deploymentManager = new RemoteDeploymentManager(kuduServiceUrl + "deployments"); return GitDeploy(deploymentManager, kuduServiceUrl, localRepoPath, remoteRepoUrl, localBranchName, remoteBranchName); }
public static TimeSpan GitDeploy(RemoteDeploymentManager deploymentManager, string kuduServiceUrl, string localRepoPath, string remoteRepoUrl, string localBranchName, string remoteBranchName) { HttpUtils.WaitForSite(kuduServiceUrl); Stopwatch sw = Stopwatch.StartNew(); Git.Push(localRepoPath, remoteRepoUrl, localBranchName, remoteBranchName); sw.Stop(); return sw.Elapsed; }