Skip to content

Commit 9170ddb

Browse files
committed
prevent s2i from running onbuild images
1 parent e456519 commit 9170ddb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/build/builder/sti.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ func (s *S2IBuilder) Build() error {
190190
CGroupLimits: s.cgLimits,
191191
Injections: injections,
192192
ScriptDownloadProxyConfig: scriptDownloadProxyConfig,
193+
BlockOnBuild: true,
193194
}
194195

195196
if s.build.Spec.Strategy.SourceStrategy.ForcePull {
@@ -343,11 +344,12 @@ func (d *downloader) Download(config *s2iapi.Config) (*s2iapi.SourceInfo, error)
343344
// 2. In case of repeated Keys, the last Value takes precedence right here,
344345
// instead of deferring what to do with repeated environment variables to the
345346
// Docker runtime.
346-
func buildEnvVars(build *api.Build) map[string]string {
347+
func buildEnvVars(build *api.Build) s2iapi.EnvironmentList {
347348
bi := buildInfo(build)
348-
envVars := make(map[string]string, len(bi))
349+
envVars := s2iapi.EnvironmentList{}
350+
349351
for _, item := range bi {
350-
envVars[item.Key] = item.Value
352+
envVars = append(envVars, s2iapi.EnvironmentSpec{Name: item.Key, Value: item.Value})
351353
}
352354
return envVars
353355
}

0 commit comments

Comments
 (0)