Skip to content

Commit cf8ddd6

Browse files
set staging mb during build (#580)
Co-authored-by: sleungcy-sap <[email protected]>
1 parent e0a7143 commit cf8ddd6

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

cloudfoundry/managers/v3appdeployers/runbinder.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,17 @@ func (r RunBinder) Start(appDeploy AppDeploy) (resources.Application, resources.
328328
// Package not staged
329329
if len(droplets) == 0 {
330330
// Stage the package
331-
build, _, err := r.client.CreateBuild(resources.Build{
332-
PackageGUID: packageGUID,
333-
})
331+
buildCreateOptions := goResource.NewBuildCreate(packageGUID)
332+
333+
if appDeploy.Process.DiskInMB.IsSet {
334+
buildCreateOptions.StagingDiskInMB = int(appDeploy.Process.DiskInMB.Value)
335+
}
336+
if appDeploy.Process.MemoryInMB.IsSet {
337+
buildCreateOptions.StagingMemoryInMB = int(appDeploy.Process.MemoryInMB.Value)
338+
}
339+
340+
build, err := r.clientGo.Builds.Create(context.Background(), buildCreateOptions)
341+
334342
if err != nil {
335343
return resources.Application{}, resources.Process{}, err
336344
}

0 commit comments

Comments
 (0)