public GitServerHttpHandler(ITracer tracer, IGitServer gitServer, IOperationLock deploymentLock, IDeploymentManager deploymentManager) { _gitServer = gitServer; _tracer = tracer; _deploymentLock = deploymentLock; _deploymentManager = deploymentManager; }
public UploadPackHandler(ITracer tracer, IGitServer gitServer, IOperationLock deploymentLock, IDeploymentManager deploymentManager) : base(tracer, gitServer, deploymentLock, deploymentManager) { }
private CustomGitRepositoryHandler CreateHandler( IGitServer gitServer = null, UploadPackHandler uploadPackHandler = null, IRepositoryFactory repositoryFactory = null, IEnvironment environment = null) { return(new CustomGitRepositoryHandler(t => { if (t == typeof(ITracer)) { return Mock.Of <ITracer>(); } else if (t == typeof(IGitServer)) { return gitServer ?? Mock.Of <IGitServer>(); } else if (t == typeof(UploadPackHandler)) { return new UploadPackHandler( Mock.Of <ITracer>(), Mock.Of <IGitServer>(), Mock.Of <IOperationLock>(), Mock.Of <IDeploymentManager>()); } else if (t == typeof(IRepositoryFactory)) { return repositoryFactory ?? Mock.Of <IRepositoryFactory>(); } else if (t == typeof(IEnvironment)) { return environment ?? Mock.Of <IEnvironment>(); } throw new NotImplementedException("type " + t.Name + " is not implemented!"); })); }
public InfoRefsService(ITracer tracer, IGitServer gitServer, IEnvironment environment, RepositoryConfiguration configuration) { _gitServer = gitServer; _tracer = tracer; _deploymentTargetPath = environment.DeploymentTargetPath; _configuration = configuration; }
private InfoRefsController CreateController(IGitServer gitServer = null, IDeploymentManager deploymentManager = null, IDeploymentSettingsManager settings = null, IRepositoryFactory repositoryFactory = null) { return new InfoRefsController(Mock.Of<ITracer>(), gitServer ?? Mock.Of<IGitServer>(), repositoryFactory ?? Mock.Of<IRepositoryFactory>()); }
public RpcService(ITracer tracer, IGitServer gitServer, IOperationLock deploymentLock) { _gitServer = gitServer; _tracer = tracer; _deploymentLock = deploymentLock; }
public ReceivePackHandler(ITracer tracer, IGitServer gitServer, IOperationLock deploymentLock, IDeploymentManager deploymentManager, IDeploymentSettingsManager settings) : base(tracer, gitServer, deploymentLock, deploymentManager, settings) { }
public ReceivePackService(ITracer tracer, IGitServer gitServer, IOperationLock deploymentLock) { _gitServer = gitServer; _tracer = tracer; _deploymentLock = deploymentLock; }
public RpcController(ITracer tracer, IGitServer gitServer, IOperationLock deploymentLock) { _gitServer = gitServer; _tracer = tracer; _deploymentLock = deploymentLock; }
public InfoRefsController( ITracer tracer, IGitServer gitServer, IRepositoryFactory repositoryFactory) { _gitServer = gitServer; _tracer = tracer; _repositoryFactory = repositoryFactory; }
public ReceivePackHandler(ITracer tracer, IGitServer gitServer, IOperationLock deploymentLock, IDeploymentManager deploymentManager, IRepositoryFactory repositoryFactory) : base(tracer, gitServer, deploymentLock, deploymentManager) { _repositoryFactory = repositoryFactory; }
protected GitServerHttpHandler(ITracer tracer, IGitServer gitServer, IOperationLock deploymentLock, IDeploymentManager deploymentManager) { GitServer = gitServer; Tracer = tracer; DeploymentLock = deploymentLock; DeploymentManager = deploymentManager; }
public RpcService(ITracer tracer, IGitServer gitServer, IDeploymentManagerFactory deploymentManagerFactory, IOperationLock deploymentLock) { _gitServer = gitServer; _deploymentManagerFactory = deploymentManagerFactory; _tracer = tracer; _deploymentLock = deploymentLock; }
private ReceivePackHandler CreateHandler(IGitServer gitServer = null, IDeploymentManager deploymentManager = null, IDeploymentSettingsManager settings = null, IRepositoryFactory repositoryFactory = null) { return new ReceivePackHandler(Mock.Of<ITracer>(), gitServer ?? Mock.Of<IGitServer>(), Mock.Of<IOperationLock>(), deploymentManager ?? Mock.Of<IDeploymentManager>(), repositoryFactory ?? Mock.Of<IRepositoryFactory>()); }
private ReceivePackHandler CreateHandler(IGitServer gitServer = null, IDeploymentManager deploymentManager = null, IDeploymentSettingsManager settings = null, IRepositoryFactory repositoryFactory = null) { return(new ReceivePackHandler(Mock.Of <ITracer>(), gitServer ?? Mock.Of <IGitServer>(), Mock.Of <IOperationLock>(), deploymentManager ?? Mock.Of <IDeploymentManager>(), repositoryFactory ?? Mock.Of <IRepositoryFactory>())); }
public FetchHandler(ITracer tracer, IGitServer gitServer, IDeploymentManager deploymentManager, IOperationLock deploymentLock, RepositoryConfiguration configuration) { _gitServer = gitServer; _deploymentManager = deploymentManager; _tracer = tracer; _deploymentLock = deploymentLock; _configuration = configuration; }
public void Invoke( HttpContext context, ITracer tracer, IGitServer gitServer, IDictionary <string, IOperationLock> namedLocks, IDeploymentManager deploymentManager) { GitServer = gitServer; Tracer = tracer; DeploymentManager = deploymentManager; DeploymentLock = namedLocks["deployment"]; }
public InfoRefsController( ITracer tracer, IGitServer gitServer, IDeploymentManager deploymentManager, IEnvironment environment, RepositoryConfiguration configuration) { _gitServer = gitServer; _deploymentManager = deploymentManager; _tracer = tracer; _webRootPath = environment.WebRootPath; _configuration = configuration; }
public FetchHandler(ITracer tracer, IGitServer gitServer, IDeploymentManager deploymentManager, IDeploymentSettingsManager settings, IOperationLock deploymentLock, RepositoryConfiguration configuration, IEnvironment environment) : base(tracer, gitServer, deploymentLock, deploymentManager) { _settings = settings; _configuration = configuration; _environment = environment; }
public InfoRefsController( ITracer tracer, IGitServer gitServer, IDeploymentManager deploymentManager, IDeploymentSettingsManager settings, IEnvironment environment) { _gitServer = gitServer; _deploymentManager = deploymentManager; _tracer = tracer; _settings = settings; _webRootPath = environment.WebRootPath; }
public InfoRefsService( ITracer tracer, IGitServer gitServer, IDeploymentManager deploymentManager, IEnvironment environment, RepositoryConfiguration configuration) { _gitServer = gitServer; _deploymentManager = deploymentManager; _tracer = tracer; _deploymentTargetPath = environment.DeploymentTargetPath; _configuration = configuration; }
public Task Invoke( HttpContext context, ITracer tracer, IGitServer gitServer) { using (tracer.Step("RpcService.UploadPackHandler")) { UpdateNoCacheForResponse(context.Response); context.Response.ContentType = "application/x-git-{0}-result".With("upload-pack"); gitServer.Upload(context.Request.Body, context.Response.Body); } return(Task.CompletedTask); }
private InfoRefsController CreateController(IGitServer gitServer = null, IDeploymentManager deploymentManager = null, IDeploymentSettingsManager settings = null, IRepositoryFactory repositoryFactory = null, IEnvironment environment = null, IFileSystem fileSystem = null, IOperationLock initLock = null) { return(new InfoRefsController(t => { if (t == typeof(ITracer)) { return Mock.Of <ITracer>(); } else if (t == typeof(IGitServer)) { return gitServer ?? Mock.Of <IGitServer>(); } else if (t == typeof(IDeploymentSettingsManager)) { return settings ?? Mock.Of <IDeploymentSettingsManager>(); } else if (t == typeof(IRepositoryFactory)) { return repositoryFactory ?? Mock.Of <IRepositoryFactory>(); } else if (t == typeof(IEnvironment)) { return environment ?? Mock.Of <IEnvironment>(); } else if (t == typeof(IFileSystem)) { return fileSystem ?? Mock.Of <IFileSystem>(); } else if (t == typeof(IOperationLock)) { return initLock ?? Mock.Of <IOperationLock>(); } throw new NotImplementedException("type " + t.Name + " is not implemented!"); })); }
public InfoRefsController(IGitServer gitServer, IRepositoryManager repositoryManager) { _gitServer = gitServer; _repositoryManager = repositoryManager; }
public InfoRefsService(IProfiler profiler, IGitServer gitServer) { _gitServer = gitServer; _profiler = profiler; }
public GitServerHttpHandler(ITracer tracer, IGitServer gitServer, IOperationLock deploymentLock) { _gitServer = gitServer; _tracer = tracer; _deploymentLock = deploymentLock; }
public async Task Invoke( HttpContext context, ITracer tracer, IGitServer gitServer, IDictionary <string, IOperationLock> namedLocks, IDeploymentManager deploymentManager, IRepositoryFactory repositoryFactory, IEnvironment environment) { //Get the deployment lock from the locks dictionary var deploymentLock = namedLocks["deployment"]; using (tracer.Step("RpcService.ReceivePack")) { // Ensure that the target directory does not have a non-Git repository. IRepository repository = repositoryFactory.GetRepository(); if (repository != null && repository.RepositoryType != RepositoryType.Git) { context.Response.StatusCode = StatusCodes.Status400BadRequest; return; } try { await deploymentLock.LockOperationAsync(() => { context.Response.ContentType = "application/x-git-receive-pack-result"; if (PostDeploymentHelper.IsAutoSwapOngoing()) { context.Response.StatusCode = StatusCodes.Status409Conflict; var msg = Encoding.UTF8.GetBytes(Resources.Error_AutoSwapDeploymentOngoing); return(context.Response.Body.WriteAsync(msg, 0, msg.Length)); } string username = null; if (AuthUtility.TryExtractBasicAuthUser(context.Request, out username)) { gitServer.SetDeployer(username); } UpdateNoCacheForResponse(context.Response); // This temporary deployment is for ui purposes only, it will always be deleted via finally. ChangeSet tempChangeSet; using (deploymentManager.CreateTemporaryDeployment(Resources.ReceivingChanges, out tempChangeSet)) { // to pass to kudu.exe post receive hook System.Environment.SetEnvironmentVariable(Constants.RequestIdHeader, environment.RequestId); try { gitServer.Receive(context.Request.Body, context.Response.Body); } finally { System.Environment.SetEnvironmentVariable(Constants.RequestIdHeader, null); } } return(Task.CompletedTask); }, "Handling git receive pack", TimeSpan.Zero); } catch (LockOperationException ex) { context.Response.StatusCode = StatusCodes.Status409Conflict; var msg = Encoding.UTF8.GetBytes(ex.Message); await context.Response.Body.WriteAsync(msg, 0, msg.Length); } } }
public CodebaseHqHandler(IGitServer gitServer) : base(gitServer) { }
private CustomGitRepositoryHandler CreateHandler( IGitServer gitServer = null, UploadPackHandler uploadPackHandler = null, IRepositoryFactory repositoryFactory = null, IEnvironment environment = null) { return new CustomGitRepositoryHandler(t => { if (t == typeof(ITracer)) { return Mock.Of<ITracer>(); } else if (t == typeof(IGitServer)) { return gitServer ?? Mock.Of<IGitServer>(); } else if (t == typeof(UploadPackHandler)) { return new UploadPackHandler( Mock.Of<ITracer>(), Mock.Of<IGitServer>(), Mock.Of<IOperationLock>(), Mock.Of<IDeploymentManager>()); } else if (t == typeof(IRepositoryFactory)) { return repositoryFactory ?? Mock.Of<IRepositoryFactory>(); } else if (t == typeof(IEnvironment)) { return environment ?? Mock.Of<IEnvironment>(); } throw new NotImplementedException("type " + t.Name + " is not implemented!"); }); }
public CodePlexHandler(IGitServer gitServer) { _gitServer = gitServer; }
public GitlabHqHandler(IGitServer gitServer) : base(gitServer) { }
private InfoRefsController CreateController(IGitServer gitServer = null, IDeploymentManager deploymentManager = null, IDeploymentSettingsManager settings = null, IRepositoryFactory repositoryFactory = null, IEnvironment environment = null, IFileSystem fileSystem = null, IOperationLock initLock = null) { return new InfoRefsController(t => { if (t == typeof(ITracer)) { return Mock.Of<ITracer>(); } else if (t == typeof(IGitServer)) { return gitServer ?? Mock.Of<IGitServer>(); } else if (t == typeof(IDeploymentSettingsManager)) { return settings ?? Mock.Of<IDeploymentSettingsManager>(); } else if (t == typeof(IRepositoryFactory)) { return repositoryFactory ?? Mock.Of<IRepositoryFactory>(); } else if (t == typeof(IEnvironment)) { return environment ?? Mock.Of<IEnvironment>(); } else if (t == typeof(IFileSystem)) { return fileSystem ?? Mock.Of<IFileSystem>(); } else if (t == typeof(IOperationLock)) { return initLock ?? Mock.Of<IOperationLock>(); } throw new NotImplementedException("type " + t.Name + " is not implemented!"); }); }
public ReceivePackHandler(ITracer tracer, IGitServer gitServer, IOperationLock deploymentLock) : base(tracer, gitServer, deploymentLock) { }
public GitHubHandler(IGitServer gitServer) : base(gitServer) { }
public RpcService(IProfiler profiler, IGitServer gitServer, IDeploymentManagerFactory deploymentManagerFactory) { _gitServer = gitServer; _deploymentManagerFactory = deploymentManagerFactory; _profiler = profiler; }
public BitbucketHandler(IGitServer gitServer) { _gitServer = gitServer; }
public GitHubCompatHandler(IGitServer gitServer) { _gitServer = gitServer; }
public RpcController(IGitServer gitServer, IDeploymentManager deploymentManager) { _gitServer = gitServer; _deploymentManager = deploymentManager; }