Skip to content

Commit

Permalink
supports more specific plan combinations for PHP + web servers
Browse files Browse the repository at this point in the history
  • Loading branch information
pivotal-david-osullivan committed Jun 21, 2024
1 parent 0bec80e commit 29a6d35
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions dt/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,26 @@ func (d Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error
return libcnb.DetectResult{
Pass: true,
Plans: []libcnb.BuildPlan{
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-php"},
},
Requires: []libcnb.BuildPlanRequire{
{Name: "dynatrace-php"},
{Name: "php"},
{Name: "httpd"},
},
},
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-php"},
},
Requires: []libcnb.BuildPlanRequire{
{Name: "dynatrace-php"},
{Name: "php"},
{Name: "nginx"},
},
},
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-apache"},
Expand Down
20 changes: 20 additions & 0 deletions dt/detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ import (
var expectedResult = libcnb.DetectResult{
Pass: true,
Plans: []libcnb.BuildPlan{
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-php"},
},
Requires: []libcnb.BuildPlanRequire{
{Name: "dynatrace-php"},
{Name: "php"},
{Name: "httpd"},
},
},
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-php"},
},
Requires: []libcnb.BuildPlanRequire{
{Name: "dynatrace-php"},
{Name: "php"},
{Name: "nginx"},
},
},
{
Provides: []libcnb.BuildPlanProvide{
{Name: "dynatrace-apache"},
Expand Down

0 comments on commit 29a6d35

Please sign in to comment.