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:
parent
50ece68f35
commit
adf1ba7b47
7 changed files with 106 additions and 45 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue