@@ -121,19 +121,24 @@ func (s *S2IBuilder) Build() error {
121
121
handleBuildStatusUpdate (s .build , s .client , nil )
122
122
return err
123
123
}
124
+ contextDir := ""
124
125
if len (s .build .Spec .Source .ContextDir ) > 0 {
125
- contextDir : = filepath .Clean (s .build .Spec .Source .ContextDir )
126
+ contextDir = filepath .Clean (s .build .Spec .Source .ContextDir )
126
127
if contextDir == "." || contextDir == "/" {
127
128
contextDir = ""
128
129
}
129
130
if sourceInfo != nil {
130
131
sourceInfo .ContextDir = s .build .Spec .Source .ContextDir
131
132
}
132
- srcDir = filepath .Join (srcDir , s .build .Spec .Source .ContextDir )
133
+ // srcDir = filepath.Join(srcDir, s.build.Spec.Source.ContextDir)
133
134
}
134
- download := & downloader {}
135
+ //download := &downloader{}
136
+ //download = nil
137
+
138
+ var s2iSourceInfo * s2iapi.SourceInfo
135
139
if sourceInfo != nil {
136
- download .sourceInfo = & sourceInfo .SourceInfo
140
+ //download.sourceInfo = &sourceInfo.SourceInfo
141
+ s2iSourceInfo = & sourceInfo .SourceInfo
137
142
revision := updateBuildRevision (s .build , sourceInfo )
138
143
handleBuildStatusUpdate (s .build , s .client , revision )
139
144
}
@@ -182,6 +187,8 @@ func (s *S2IBuilder) Build() error {
182
187
DockerNetworkMode : getDockerNetworkMode (),
183
188
184
189
Source : srcDir ,
190
+ ContextDir : contextDir ,
191
+ SourceInfo : s2iSourceInfo ,
185
192
ForceCopy : true ,
186
193
Injections : injections ,
187
194
@@ -241,7 +248,7 @@ func (s *S2IBuilder) Build() error {
241
248
}
242
249
243
250
glog .V (4 ).Infof ("Creating a new S2I builder with build config: %#v\n " , describe .Config (config ))
244
- builder , buildInfo , err := s .builder .Builder (config , s2ibuild.Overrides {Downloader : download })
251
+ builder , buildInfo , err := s .builder .Builder (config , s2ibuild.Overrides {Downloader : nil })
245
252
if err != nil {
246
253
s .build .Status .Reason , s .build .Status .Message = convertS2IFailureType (
247
254
buildInfo .FailureReason .Reason ,
0 commit comments