Skip to content

Commit e124995

Browse files
committed
feat(builder): Less verbose buildpack output
part 2 of teamhephy/workflow#109 This fixes the excessive verbouse output when cycling through all buildpacks /bin/detect and the app doesn't match such buildpack This PR forwards the variable DEIS_DEBUG_BUILDPACK to the slugbuilder
1 parent 5fe6b14 commit e124995

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

pkg/gitreceive/build.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ func build(
110110
}
111111
}
112112

113+
var buildPackDebug string
114+
if buildPackDebugInterface, ok := appConf.Values["DEIS_BUILDPACK_DEBUG"]; ok {
115+
if bpDbgStr, ok := buildPackDebugInterface.(string); ok {
116+
log.Debug("Buildpack Debug is on")
117+
buildPackDebug = bpDbgStr
118+
}
119+
}
120+
113121
_, disableCaching := appConf.Values["DEIS_DISABLE_CACHE"]
114122
slugBuilderInfo := NewSlugBuilderInfo(appName, gitSha.Short(), disableCaching)
115123

@@ -227,6 +235,7 @@ func build(
227235
cacheKey,
228236
gitSha.Short(),
229237
buildPackURL,
238+
buildPackDebug,
230239
conf.StorageType,
231240
conf.SlugBuilderImage,
232241
slugBuilderImagePullPolicy,

pkg/gitreceive/k8s_util.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func slugbuilderPod(
125125
cacheKey,
126126
gitShortHash string,
127127
buildpackURL,
128+
buildpackDebug,
128129
storageType,
129130
image string,
130131
pullPolicy api.PullPolicy,
@@ -165,6 +166,10 @@ func slugbuilderPod(
165166
addEnvToPod(pod, "BUILDPACK_URL", buildpackURL)
166167
}
167168

169+
if buildpackDebug != "" {
170+
addEnvToPod(pod, "DEIS_BUILDPACK_DEBUG", buildpackDebug)
171+
}
172+
168173
return &pod
169174
}
170175

0 commit comments

Comments
 (0)