|
|
@@ -4,12 +4,10 @@ import (
|
|
|
"context"
|
|
|
"fmt"
|
|
|
"path/filepath"
|
|
|
- "strings"
|
|
|
|
|
|
"github.com/buildpacks/pack"
|
|
|
"github.com/porter-dev/porter/api/types"
|
|
|
"github.com/porter-dev/porter/cli/cmd/docker"
|
|
|
- "github.com/porter-dev/porter/internal/integrations/buildpacks"
|
|
|
)
|
|
|
|
|
|
type Agent struct{}
|
|
|
@@ -34,7 +32,7 @@ func (a *Agent) Build(opts *docker.BuildOpts, buildConfig *types.BuildConfig) er
|
|
|
buildOpts := pack.BuildOptions{
|
|
|
RelativeBaseDir: filepath.Dir(absPath),
|
|
|
Image: fmt.Sprintf("%s:%s", opts.ImageRepo, opts.Tag),
|
|
|
- Builder: buildpacks.DefaultBuilder,
|
|
|
+ Builder: "paketobuildpacks/builder:full",
|
|
|
AppPath: opts.BuildContext,
|
|
|
TrustBuilder: true,
|
|
|
Env: opts.Env,
|
|
|
@@ -48,9 +46,5 @@ func (a *Agent) Build(opts *docker.BuildOpts, buildConfig *types.BuildConfig) er
|
|
|
// FIXME: use all the config vars
|
|
|
}
|
|
|
|
|
|
- if strings.HasPrefix(buildOpts.Builder, "paketo") {
|
|
|
- buildOpts.Buildpacks = append(buildOpts.Buildpacks, "porterhub/paketo-build-plan:latest")
|
|
|
- }
|
|
|
-
|
|
|
return client.Build(context, buildOpts)
|
|
|
}
|