refactor(stack): create stack and deploy stack in async flow CE [BE-12650] (#2238)

This commit is contained in:
Oscar Zhou
2026-04-07 09:18:54 +12:00
committed by GitHub
parent fcf9888677
commit 5aba61cc49
28 changed files with 825 additions and 157 deletions
@@ -31,8 +31,12 @@ func (b *FileContentMethodStackBuilder) SetGeneralInfo(payload *StackPayload, en
stackID := b.dataStore.Stack().GetNextIdentifier()
b.stack.ID = portainer.StackID(stackID)
b.stack.EndpointID = endpoint.ID
b.stack.Status = portainer.StackStatusActive
b.stack.CreationDate = time.Now().Unix()
now := time.Now().Unix()
b.stack.Status = portainer.StackStatusDeploying
b.stack.CreationDate = now
b.stack.DeploymentStatus = []portainer.StackDeploymentStatus{
{Status: portainer.StackStatusDeploying, Time: now},
}
return b
}