Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage scribe.Emitter functionality #264

Merged
merged 1 commit into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ func Build(
}
pipLayer.SharedEnv.Prepend("PYTHONPATH", strings.TrimRight(sitePackagesPath, "\n"), ":")

logger.Process("Configuring environment")
logger.Subprocess("%s", scribe.NewFormattedMapFromEnvironment(pipLayer.SharedEnv))
logger.Break()
logger.EnvironmentVariables(pipLayer)

pipLayer.Metadata = map[string]interface{}{
DependencySHAKey: dependency.SHA256,
Expand Down
1 change: 0 additions & 1 deletion build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
Expect(buffer.String()).To(ContainSubstring("Some Buildpack some-version"))
Expect(buffer.String()).To(ContainSubstring("Executing build process"))
Expect(buffer.String()).To(ContainSubstring("Installing Pip"))
Expect(buffer.String()).To(ContainSubstring("Configuring environment"))
})

context("when build plan entries require pip at build/launch", func() {
Expand Down
5 changes: 4 additions & 1 deletion integration/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ func testDefault(t *testing.T, context spec.G, it spec.S) {
MatchRegexp(` Completed in \d+\.\d+`),
))
Expect(logs).To(ContainLines(
" Configuring environment",
" Configuring build environment",
MatchRegexp(fmt.Sprintf(` PYTHONPATH -> "\/layers\/%s\/pip\/lib\/python\d+\.\d+\/site-packages:\$PYTHONPATH"`, strings.ReplaceAll(buildpackInfo.Buildpack.ID, "/", "_"))),
"",
" Configuring launch environment",
MatchRegexp(fmt.Sprintf(` PYTHONPATH -> "\/layers\/%s\/pip\/lib\/python\d+\.\d+\/site-packages:\$PYTHONPATH"`, strings.ReplaceAll(buildpackInfo.Buildpack.ID, "/", "_"))),
))

Expand Down
5 changes: 4 additions & 1 deletion integration/layer_reuse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ func testLayerReuse(t *testing.T, context spec.G, it spec.S) {
MatchRegexp(` Completed in \d+\.\d+`),
))
Expect(logs).To(ContainLines(
" Configuring environment",
" Configuring build environment",
MatchRegexp(fmt.Sprintf(` PYTHONPATH -> "\/layers\/%s\/pip\/lib\/python\d+\.\d+\/site-packages:\$PYTHONPATH"`, strings.ReplaceAll(buildpackInfo.Buildpack.ID, "/", "_"))),
"",
" Configuring launch environment",
MatchRegexp(fmt.Sprintf(` PYTHONPATH -> "\/layers\/%s\/pip\/lib\/python\d+\.\d+\/site-packages:\$PYTHONPATH"`, strings.ReplaceAll(buildpackInfo.Buildpack.ID, "/", "_"))),
))

Expand Down