Skip to content

Commit

Permalink
Add verbose logging to Analyze and Build phases
Browse files Browse the repository at this point in the history
Signed-off-by: David Freilich <dfreilich@vmware.com>
  • Loading branch information
dfreilich committed May 20, 2020
1 parent 45c26d2 commit 9654c17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions internal/build/phases.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (l *Lifecycle) newAnalyze(repoName, cacheName, networkMode string, publish,
WithEnv(fmt.Sprintf("%s=%d", builder.EnvUID, l.builder.UID()), fmt.Sprintf("%s=%d", builder.EnvGID, l.builder.GID())),
WithRegistryAccess(authConfig),
WithRoot(),
WithArgs(args...),
WithArgs(l.withLogLevel(args...)...),
WithNetwork(networkMode),
WithBinds(fmt.Sprintf("%s:%s", cacheName, cacheDir)),
)
Expand Down Expand Up @@ -215,9 +215,11 @@ func (l *Lifecycle) Build(ctx context.Context, networkMode string, volumes []str
"builder",
l,
WithArgs(
"-layers", layersDir,
"-app", appDir,
"-platform", platformDir,
l.withLogLevel(
"-layers", layersDir,
"-app", appDir,
"-platform", platformDir,
)...,
),
WithNetwork(networkMode),
WithBinds(volumes...),
Expand Down
4 changes: 2 additions & 2 deletions internal/build/phases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ func testPhases(t *testing.T, when spec.G, it spec.S) {
h.AssertEq(t, configProvider.Name(), "analyzer")
h.AssertIncludeAllExpectedPatterns(t,
configProvider.ContainerConfig().Cmd,
//[]string{"-log-level", "debug"}, // TODO: fix [https://github.com/buildpacks/pack/issues/419].
[]string{"-log-level", "debug"},
[]string{"-layers", "/layers"},
[]string{expectedRepoName},
)
Expand Down Expand Up @@ -569,7 +569,7 @@ func testPhases(t *testing.T, when spec.G, it spec.S) {
h.AssertEq(t, configProvider.Name(), "builder")
h.AssertIncludeAllExpectedPatterns(t,
configProvider.ContainerConfig().Cmd,
//[]string{"-log-level", "debug"}, // TODO: fix [https://github.com/buildpacks/pack/issues/419].
[]string{"-log-level", "debug"},
[]string{"-layers", "/layers"},
[]string{"-app", "/workspace"},
[]string{"-platform", "/platform"},
Expand Down

0 comments on commit 9654c17

Please sign in to comment.