1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +02:00

feat(stacks): redeploy git stack [EE-161] (#5139)

* feat(git): save git config when creating stack (#5048)

* feat(git): save git config when creating stack

* chore(fs): test fileExists

* fix(git): fix tests to use CloneRepository

* refactor(git): move options to new object

* feat(stacks): redeploy git stack api (#5112)

* feat(stacks): redeploy git stacks form

[EE-666]

* feat(stack): show loading after confirmation

* fix(stacks): show same size description

* fix(stacks): reload state when deployed

* feat(stacks): set stopped stacks status to activate when updating

* feat(stacks): backup stack folder before cloning

* feat(stacks): don't accept prune and env on update git

Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com>
Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com>
This commit is contained in:
Dmitry Salakhov 2021-06-16 09:11:35 +12:00 committed by GitHub
parent 296ecc5960
commit 0b93714de4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 795 additions and 381 deletions

View file

@ -3,6 +3,8 @@ package portainer
import (
"io"
"time"
gittypes "github.com/portainer/portainer/api/git/types"
)
type (
@ -699,6 +701,8 @@ type (
UpdateDate int64 `example:"1587399600"`
// The username which last updated this stack
UpdatedBy string `example:"bob"`
// The git config of this stack
GitConfig *gittypes.RepoConfig
}
// StackID represents a stack identifier (it must be composed of Name + "_" + SwarmID to create a unique identifier)
@ -1140,8 +1144,7 @@ type (
// GitService represents a service for managing Git
GitService interface {
ClonePublicRepository(repositoryURL, referenceName string, destination string) error
ClonePrivateRepositoryWithBasicAuth(repositoryURL, referenceName string, destination, username, password string) error
CloneRepository(destination string, repositoryURL, referenceName, username, password string) error
}
// JWTService represents a service for managing JWT tokens