github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/actor/v7pushaction/create_deployment_for_push_plan.go (about) 1 package v7pushaction 2 3 func (actor Actor) CreateDeploymentForApplication(pushPlan PushPlan, eventStream chan<- *PushEvent, progressBar ProgressBar) (PushPlan, Warnings, error) { 4 eventStream <- &PushEvent{Plan: pushPlan, Event: StartingDeployment} 5 6 deploymentGUID, warnings, err := actor.V7Actor.CreateDeploymentByApplicationAndDroplet(pushPlan.Application.GUID, pushPlan.DropletGUID) 7 8 if err != nil { 9 return pushPlan, Warnings(warnings), err 10 } 11 12 eventStream <- &PushEvent{Plan: pushPlan, Event: WaitingForDeployment} 13 14 handleInstanceDetails := func(instanceDetails string) { 15 eventStream <- &PushEvent{ 16 Plan: pushPlan, 17 Warnings: Warnings{instanceDetails}, 18 Event: InstanceDetails, 19 } 20 } 21 22 pollWarnings, err := actor.V7Actor.PollStartForRolling(pushPlan.Application, deploymentGUID, pushPlan.NoWait, handleInstanceDetails) 23 warnings = append(warnings, pollWarnings...) 24 25 return pushPlan, Warnings(warnings), err 26 }