fix(stack): persist CreatedBy before deployment to prevent broken auto update [BE-12939] (#2588)
This commit is contained in:
@@ -20,10 +20,14 @@ type GitMethodStackBuilder struct {
|
||||
scheduler *scheduler.Scheduler
|
||||
}
|
||||
|
||||
func (b *GitMethodStackBuilder) prepare(ctx context.Context, payload *StackPayload) error {
|
||||
func (b *GitMethodStackBuilder) prepare(ctx context.Context, payload *StackPayload, userID portainer.UserID) error {
|
||||
b.stack.AdditionalFiles = payload.AdditionalFiles
|
||||
b.stack.AutoUpdate = payload.AutoUpdate
|
||||
|
||||
if err := b.initCreatedBy(userID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var repoConfig gittypes.RepoConfig
|
||||
if payload.Authentication {
|
||||
repoConfig.Authentication = &gittypes.GitAuthentication{
|
||||
|
||||
Reference in New Issue
Block a user