1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

feat(stack-creation): add the ability to specify git credentials (#1722)

* feat(stack-creation): add the ability to specify git credentials

* docs(api): update Swagger
This commit is contained in:
Anthony Lapenna 2018-03-16 07:22:05 +10:00 committed by GitHub
parent 50ece68f35
commit adf1ba7b47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 106 additions and 45 deletions

View file

@ -124,7 +124,7 @@ function StackServiceFactory($q, Stack, ResourceControlService, FileUploadServic
return deferred.promise;
};
service.createStackFromGitRepository = function(name, gitRepository, pathInRepository, env) {
service.createStackFromGitRepository = function(name, repositoryOptions, env) {
var deferred = $q.defer();
SwarmService.swarm()
@ -133,8 +133,11 @@ function StackServiceFactory($q, Stack, ResourceControlService, FileUploadServic
var payload = {
Name: name,
SwarmID: swarm.Id,
GitRepository: gitRepository,
PathInRepository: pathInRepository,
RepositoryURL: repositoryOptions.RepositoryURL,
ComposeFilePathInRepository: repositoryOptions.ComposeFilePathInRepository,
RepositoryAuthentication: repositoryOptions.RepositoryAuthentication,
RepositoryUsername: repositoryOptions.RepositoryUsername,
RepositoryPassword: repositoryOptions.RepositoryPassword,
Env: env
};
return Stack.create({ method: 'repository' }, payload).$promise;