Пример #1
0
        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;
        }
Пример #2
0
        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;
        }
Пример #3
0
 public static bool PrepareSSHEnv(RemoteSSHKeyManager sshManager)
 {
     string sshKey = ReadManifestFile(SSHKeyFile);
     if (!String.IsNullOrEmpty(sshKey))
     {
         sshManager.SetPrivateKey(sshKey).Wait();
         return true;
     }
     return false;
 }