Skip to content

Commit f0dbc67

Browse files
author
Keerthan Mala
committed
fix(proctype):deploy dockerfile app with procfile
1 parent 6af3c5b commit f0dbc67

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

pkg/gitreceive/build.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,8 @@ func build(
232232
log.Debug("Done")
233233

234234
procType := pkg.ProcessType{}
235-
if bType == buildTypeProcfile {
236-
if procType, err = getProcFile(storageDriver, tmpDir, slugBuilderInfo.AbsoluteProcfileKey()); err != nil {
237-
return err
238-
}
235+
if procType, err = getProcFile(storageDriver, tmpDir, slugBuilderInfo.AbsoluteProcfileKey(), bType); err != nil {
236+
return err
239237
}
240238

241239
log.Info("Build complete.")
@@ -275,7 +273,7 @@ func prettyPrintJSON(data interface{}) (string, error) {
275273
return string(formatted.Bytes()), nil
276274
}
277275

278-
func getProcFile(getter storage.ObjectGetter, dirName, procfileKey string) (pkg.ProcessType, error) {
276+
func getProcFile(getter storage.ObjectGetter, dirName, procfileKey string, bType buildType) (pkg.ProcessType, error) {
279277
procType := pkg.ProcessType{}
280278
if _, err := os.Stat(fmt.Sprintf("%s/Procfile", dirName)); err == nil {
281279
rawProcFile, err := ioutil.ReadFile(fmt.Sprintf("%s/Procfile", dirName))
@@ -287,6 +285,9 @@ func getProcFile(getter storage.ObjectGetter, dirName, procfileKey string) (pkg.
287285
}
288286
return procType, nil
289287
}
288+
if bType != buildTypeProcfile {
289+
return procType, nil
290+
}
290291
log.Debug("Procfile not present. Getting it from the buildpack")
291292
rawProcFile, err := getter.GetContent(context.Background(), procfileKey)
292293
if err != nil {

0 commit comments

Comments
 (0)