예제 #1
0
 public GitDeploymentRepository(string path, ITraceFactory traceFactory)
 {
     _gitExe = new GitExecutable(path);
     _gitExe.SetTraceLevel(2);
     _traceFactory = traceFactory;
     _repository   = new GitExeRepository(path, traceFactory);
     _repository.SetTraceLevel(2);
 }
예제 #2
0
 public GitExeRepository(IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory profilerFactory)
 {
     _gitExe                  = new GitExecutable(environment.RepositoryPath, settings.GetCommandIdleTimeout());
     _tracerFactory           = profilerFactory;
     _settings                = settings;
     SkipPostReceiveHookCheck = false;
     _gitExe.SetHomePath(environment);
 }
예제 #3
0
 public GitExeServer(string path, IProfilerFactory profilerFactory)
 {
     _gitExe = new GitExecutable(path);
     _gitExe.SetTraceLevel(2);
     _profilerFactory = profilerFactory;
     _repository = new GitExeRepository(path, profilerFactory);
     _repository.SetTraceLevel(2);
 }
예제 #4
0
 public GitDeploymentRepository(string path, ITraceFactory traceFactory)
 {
     _gitExe = new GitExecutable(path);
     _gitExe.SetTraceLevel(2);
     _traceFactory = traceFactory;
     _repository = new GitExeRepository(path, traceFactory);
     _repository.SetTraceLevel(2);
 }
예제 #5
0
파일: GitExeServer.cs 프로젝트: loudej/kudu
 public GitExeServer(string path, IOperationLock initLock, ITraceFactory traceFactory)
 {
     _gitExe = new GitExecutable(path);
     _gitExe.SetTraceLevel(2);
     _traceFactory = traceFactory;
     _repository = new GitExeRepository(path, traceFactory);
     _repository.SetTraceLevel(2);
     _initLock = initLock;
 }
예제 #6
0
        public GitExeRepository(string path, string homePath, ITraceFactory profilerFactory)
        {
            _gitExe = new GitExecutable(path);
            _tracerFactory = profilerFactory;

            if (!String.IsNullOrEmpty(homePath))
            {
                _gitExe.SetHomePath(homePath);
            }
        }
예제 #7
0
        public GitExeRepository(string path, string homePath, ITraceFactory profilerFactory)
        {
            _gitExe        = new GitExecutable(path);
            _tracerFactory = profilerFactory;

            if (!String.IsNullOrEmpty(homePath))
            {
                _gitExe.SetHomePath(homePath);
            }
        }
예제 #8
0
        public GitExeRepository(string path, string homePath, IDeploymentSettingsManager settings, ITraceFactory profilerFactory)
        {
            _gitExe = new GitExecutable(path, settings.GetCommandIdleTimeout());
            _tracerFactory = profilerFactory;
            _settings = settings;

            if (!String.IsNullOrEmpty(homePath))
            {
                _gitExe.SetHomePath(homePath);
            }
        }
예제 #9
0
        public GitExeServer(string path, IOperationLock initLock, IDeploymentCommandGenerator deploymentCommandGenerator, ITraceFactory traceFactory)
        {
            _gitExe = new GitExecutable(path);
            _gitExe.SetTraceLevel(2);
            _traceFactory = traceFactory;
            _repository = new GitExeRepository(path, traceFactory);
            _repository.SetTraceLevel(2);
            _initLock = initLock;
            _deploymentCommandGenerator = deploymentCommandGenerator;

            // Setup the deployment environment variable to be used by the post receive hook
            _gitExe.EnvironmentVariables[_deploymentCommandGenerator.DeploymentEnvironmentVariable] = _deploymentCommandGenerator.GetDeploymentExePath();
        }
예제 #10
0
        public GitExeServer(string path, IOperationLock initLock, IDeploymentEnvironment deploymentEnvironment, ITraceFactory traceFactory)
        {
            _gitExe       = new GitExecutable(path);
            _traceFactory = traceFactory;
            _repository   = new GitExeRepository(path, traceFactory);
            _initLock     = initLock;

            // Setup the deployment environment variable to be used by the post receive hook
            _gitExe.EnvironmentVariables[KnownEnviornment.EXEPATH]  = deploymentEnvironment.ExePath;
            _gitExe.EnvironmentVariables[KnownEnviornment.APPPATH]  = deploymentEnvironment.ApplicationPath;
            _gitExe.EnvironmentVariables[KnownEnviornment.MSBUILD]  = deploymentEnvironment.MSBuildExtensionsPath;
            _gitExe.EnvironmentVariables[KnownEnviornment.DEPLOYER] = "";
        }
예제 #11
0
 private void SafeCleanWebConfig(DeploymentContext context)
 {
     try
     {
         var git = new GitExecutable(Environment.RepositoryPath, DeploymentSettings.GetCommandIdleTimeout());
         string webConfigPath = Path.Combine(ProjectPath, "web.config");
         git.Execute("clean -f " + webConfigPath);
     }
     catch (Exception ex)
     {
         context.Logger.Log(ex);
     }
 }
예제 #12
0
        public GitExeServer(string path, IOperationLock initLock, IDeploymentEnvironment deploymentEnvironment, ITraceFactory traceFactory)
        {
            _gitExe = new GitExecutable(path);
            _traceFactory = traceFactory;
            _repository = new GitExeRepository(path, traceFactory);
            _initLock = initLock;

            // Setup the deployment environment variable to be used by the post receive hook
            _gitExe.EnvironmentVariables[KnownEnviornment.EXEPATH] = deploymentEnvironment.ExePath;
            _gitExe.EnvironmentVariables[KnownEnviornment.APPPATH] = deploymentEnvironment.ApplicationPath;
            _gitExe.EnvironmentVariables[KnownEnviornment.MSBUILD] = deploymentEnvironment.MSBuildExtensionsPath;
            _gitExe.EnvironmentVariables[KnownEnviornment.DEPLOYER] = "";
        }
예제 #13
0
        public GitExeServer(string path, string homePath, IOperationLock initLock, string logFileEnv, IDeploymentEnvironment deploymentEnvironment, ITraceFactory traceFactory)
        {
            _gitExe = new GitExecutable(path);
            _gitExe.SetHomePath(homePath);
            _traceFactory = traceFactory;
            _repository = new GitExeRepository(path, homePath, traceFactory);
            _initLock = initLock;

            // Transfer logFileEnv => git.exe => kudu.exe, this represent per-request tracefile
            _gitExe.EnvironmentVariables[Constants.TraceFileEnvKey] = logFileEnv;

            // Setup the deployment environment variable to be used by the post receive hook
            _gitExe.EnvironmentVariables[KnownEnvironment.EXEPATH] = deploymentEnvironment.ExePath;
            _gitExe.EnvironmentVariables[KnownEnvironment.APPPATH] = deploymentEnvironment.ApplicationPath;
            _gitExe.EnvironmentVariables[KnownEnvironment.MSBUILD] = deploymentEnvironment.MSBuildExtensionsPath;
            _gitExe.EnvironmentVariables[KnownEnvironment.DEPLOYER] = "";
        }
예제 #14
0
        public GitExeServer(string path, string homePath, IOperationLock initLock, string logFileEnv, IDeploymentEnvironment deploymentEnvironment, ITraceFactory traceFactory)
        {
            _gitExe = new GitExecutable(path);
            _gitExe.SetHomePath(homePath);
            _traceFactory = traceFactory;
            _repository   = new GitExeRepository(path, homePath, traceFactory);
            _initLock     = initLock;

            // Transfer logFileEnv => git.exe => kudu.exe, this represent per-request tracefile
            _gitExe.EnvironmentVariables[Constants.TraceFileEnvKey] = logFileEnv;

            // Setup the deployment environment variable to be used by the post receive hook
            _gitExe.EnvironmentVariables[KnownEnviornment.EXEPATH]  = deploymentEnvironment.ExePath;
            _gitExe.EnvironmentVariables[KnownEnviornment.APPPATH]  = deploymentEnvironment.ApplicationPath;
            _gitExe.EnvironmentVariables[KnownEnviornment.MSBUILD]  = deploymentEnvironment.MSBuildExtensionsPath;
            _gitExe.EnvironmentVariables[KnownEnviornment.DEPLOYER] = "";
        }
예제 #15
0
        private void SafeCleanWebConfig(DeploymentContext context)
        {
            try
            {
                var git = new GitExecutable(Environment.RepositoryPath, DeploymentSettings.GetCommandIdleTimeout());
                string webConfigPath = Path.Combine(ProjectPath, "web.config");

                if (!String.IsNullOrEmpty(HomePath))
                {
                    git.SetHomePath(HomePath);
                }

                git.Execute("clean -f " + webConfigPath);
            }
            catch (Exception ex)
            {
                context.Tracer.TraceError(ex);
            }
        }
예제 #16
0
        public GitExeServer(IEnvironment environment,
                            IOperationLock initLock,
                            string logFileEnv,
                            IRepositoryFactory repositoryFactory,
                            IDeploymentEnvironment deploymentEnvironment,
                            IDeploymentSettingsManager settings,
                            ITraceFactory traceFactory)
        {
            _gitExe = new GitExecutable(environment.RepositoryPath, settings.GetCommandIdleTimeout());
            _gitExe.SetHomePath(environment.SiteRootPath);
            _traceFactory      = traceFactory;
            _initLock          = initLock;
            _repositoryFactory = repositoryFactory;

            // Transfer logFileEnv => git.exe => kudu.exe, this represent per-request tracefile
            _gitExe.EnvironmentVariables[Constants.TraceFileEnvKey] = logFileEnv;

            // Setup the deployment environment variable to be used by the post receive hook
            _gitExe.EnvironmentVariables[KnownEnvironment.EXEPATH]  = deploymentEnvironment.ExePath;
            _gitExe.EnvironmentVariables[KnownEnvironment.APPPATH]  = deploymentEnvironment.ApplicationPath;
            _gitExe.EnvironmentVariables[KnownEnvironment.MSBUILD]  = deploymentEnvironment.MSBuildExtensionsPath;
            _gitExe.EnvironmentVariables[KnownEnvironment.DEPLOYER] = "";
        }
예제 #17
0
파일: GitExeServer.cs 프로젝트: 40a/kudu
        public GitExeServer(IEnvironment environment,
                            IOperationLock initLock, 
                            string logFileEnv,
                            IRepositoryFactory repositoryFactory,
                            IDeploymentEnvironment deploymentEnvironment, 
                            IDeploymentSettingsManager settings, 
                            ITraceFactory traceFactory)
        {
            _gitExe = new GitExecutable(environment.RepositoryPath, settings.GetCommandIdleTimeout());
            _gitExe.SetHomePath(environment);
            _traceFactory = traceFactory;
            _initLock = initLock;
            _repositoryFactory = repositoryFactory;

            // Transfer logFileEnv => git.exe => kudu.exe, this represent per-request tracefile
            _gitExe.EnvironmentVariables[Constants.TraceFileEnvKey] = logFileEnv;

            // Setup the deployment environment variable to be used by the post receive hook
            _gitExe.EnvironmentVariables[KnownEnvironment.EXEPATH] = deploymentEnvironment.ExePath;
            _gitExe.EnvironmentVariables[KnownEnvironment.APPPATH] = deploymentEnvironment.ApplicationPath;
            _gitExe.EnvironmentVariables[KnownEnvironment.MSBUILD] = deploymentEnvironment.MSBuildExtensionsPath;
            _gitExe.EnvironmentVariables[KnownEnvironment.DEPLOYER] = "";
        }
예제 #18
0
파일: GitExeServer.cs 프로젝트: plurby/kudu
        public GitExeServer(string path, string homePath, IOperationLock initLock, string logFileEnv, IDeploymentEnvironment deploymentEnvironment, IDeploymentSettingsManager settings, ITraceFactory traceFactory)
        {
            // Honor settings if longer
            var gitTimeout = settings.GetCommandIdleTimeout();
            if (gitTimeout < _gitMinTimeout)
            {
                gitTimeout = _gitMinTimeout;
            }

            _gitExe = new GitExecutable(path, gitTimeout);
            _gitExe.SetHomePath(homePath);
            _traceFactory = traceFactory;
            _repository = new GitExeRepository(path, homePath, settings, traceFactory);
            _initLock = initLock;

            // Transfer logFileEnv => git.exe => kudu.exe, this represent per-request tracefile
            _gitExe.EnvironmentVariables[Constants.TraceFileEnvKey] = logFileEnv;

            // Setup the deployment environment variable to be used by the post receive hook
            _gitExe.EnvironmentVariables[KnownEnvironment.EXEPATH] = deploymentEnvironment.ExePath;
            _gitExe.EnvironmentVariables[KnownEnvironment.APPPATH] = deploymentEnvironment.ApplicationPath;
            _gitExe.EnvironmentVariables[KnownEnvironment.MSBUILD] = deploymentEnvironment.MSBuildExtensionsPath;
            _gitExe.EnvironmentVariables[KnownEnvironment.DEPLOYER] = "";
        }
예제 #19
0
 public GitExeRepository(string path, ITraceFactory profilerFactory)
 {
     _gitExe        = new GitExecutable(path);
     _tracerFactory = profilerFactory;
 }
예제 #20
0
파일: Git.cs 프로젝트: jimlamb/kudu
        private static Executable GetGitExe(string repositoryPath)
        {
            if (!Path.IsPathRooted(repositoryPath))
            {
                repositoryPath = Path.Combine(PathHelper.LocalRepositoriesDir, repositoryPath);
            }

            FileSystemHelpers.EnsureDirectory(repositoryPath);

            var exe = new GitExecutable(repositoryPath);
            exe.SetTraceLevel(2);
            exe.SetHttpVerbose(true);

            return exe;
        }
예제 #21
0
파일: Git.cs 프로젝트: dpvreony-forks/kudu
        private static Executable GetGitExe(string repositoryPath, IDictionary<string, string> environments = null)
        {
            if (!Path.IsPathRooted(repositoryPath))
            {
                repositoryPath = Path.Combine(PathHelper.LocalRepositoriesDir, repositoryPath);
            }

            FileSystemHelpers.EnsureDirectory(repositoryPath);

            var exe = new GitExecutable(repositoryPath);
            exe.SetTraceLevel(2);
            exe.SetHttpVerbose(true);
            exe.SetSSLNoVerify(true);

            if (environments != null)
            {
                foreach (var pair in environments)
                {
                    exe.EnvironmentVariables.Add(pair);
                }
            }

            return exe;
        }
예제 #22
0
파일: Git.cs 프로젝트: 40a/kudu
 public static string CloneToLocal(string cloneUri, string path = null)
 {
     string repositoryPath = path ?? Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
     Directory.CreateDirectory(repositoryPath);
     var exe = new GitExecutable(repositoryPath, idleTimeout: TimeSpan.FromSeconds(3600));
     exe.SetTraceLevel(2);
     exe.SetHttpVerbose(true);
     exe.SetSSLNoVerify(true);
     GitExecute(exe, "clone \"{0}\" .", cloneUri);
     return repositoryPath;
 }
예제 #23
0
파일: Git.cs 프로젝트: KoprowskiT/kudu
        private static Executable GetGitExe(string repositoryPath, IDictionary<string, string> environments = null)
        {
            if (!Path.IsPathRooted(repositoryPath))
            {
                repositoryPath = Path.Combine(PathHelper.LocalRepositoriesDir, repositoryPath);
            }

            FileSystemHelpers.EnsureDirectory(repositoryPath);

            // Use a really long idle timeout, since it's mostly meaningful when running on server, not client
            var exe = new GitExecutable(repositoryPath, idleTimeout: TimeSpan.FromSeconds(3600));
            exe.SetTraceLevel(2);
            exe.SetHttpVerbose(true);
            exe.SetSSLNoVerify(true);

            if (environments != null)
            {
                foreach (var pair in environments)
                {
                    exe.EnvironmentVariables.Add(pair);
                }
            }

            return exe;
        }
예제 #24
0
 public GitExeRepository(string path, ITraceFactory profilerFactory)
 {
     _gitExe = new GitExecutable(path);
     _tracerFactory = profilerFactory;
 }