示例#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 GitDeploymentRepository(string path, ITraceFactory traceFactory)
 {
     _gitExe = new GitExecutable(path);
     _gitExe.SetTraceLevel(2);
     _traceFactory = traceFactory;
     _repository = new GitExeRepository(path, traceFactory);
     _repository.SetTraceLevel(2);
 }
示例#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 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;
 }
示例#5
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();
        }
示例#6
0
        public GitExeServer(string path, IOperationLock initLock, IDeploymentEnvironment deploymentEnvironment, ITraceFactory traceFactory)
        {
            _gitExe = new GitExecutable(path);
            _gitExe.SetTraceLevel(2);
            _traceFactory = traceFactory;
            _repository   = new GitExeRepository(path, traceFactory);
            _repository.SetTraceLevel(2);
            _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] = "";
        }
 public void SetTraceLevel(int level)
 {
     _gitExe.SetTraceLevel(level);
 }
示例#8
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;
        }
示例#9
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;
        }
示例#10
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;
 }
示例#11
0
        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;
        }