fix: skip app.json buildpacks for image-based deploys
When deploying via git:from-image, the source image may contain an app.json with buildpacks entries that are not relevant. Check for the source-image property and skip app.json buildpacks when set.
This commit is contained in:
1 file changed
+8
@@ -28,6 +28,14 @@ func getBuildpacks(appName string) ([]string, error) {
|
|||||||
return buildpacks, nil
|
return buildpacks, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
results, _ := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||||
|
Trigger: "git-get-property",
|
||||||
|
Args: []string{appName, "source-image"},
|
||||||
|
})
|
||||||
|
if results.StdoutContents() != "" {
|
||||||
|
return buildpacks, nil
|
||||||
|
}
|
||||||
|
|
||||||
appJSON, err := appjson.GetAppJSON(appName)
|
appJSON, err := appjson.GetAppJSON(appName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return buildpacks, err
|
return buildpacks, err
|
||||||
|
|||||||
Reference in new issue
Block a user