@@ -155,10 +155,7 @@ func buildFunc(cmd *cobra.Command, args []string) {
155
155
log .Fatalf ("failed to build operator binary: (%v)" , err )
156
156
}
157
157
}
158
- buildCmd := exec .Command ("docker" , "build" , "." ,
159
- "-f" , buildDockerfile ,
160
- "-t" , baseImageName )
161
- err := projutil .ExecCmd (buildCmd )
158
+ err := projutil .DockerBuild (buildDockerfile , baseImageName )
162
159
if err != nil {
163
160
if enableTests {
164
161
log .Fatalf ("failed to output intermediate image %s: (%v)" , image , err )
@@ -207,13 +204,10 @@ func buildFunc(cmd *cobra.Command, args []string) {
207
204
log .Fatalf ("failed to build operator binary: (%v)" , err )
208
205
}
209
206
}
210
- testBuildCmd := exec .Command ("docker" , "build" , "." ,
211
- "-f" , testDockerfile ,
212
- "-t" , image ,
213
- "--build-arg" , "TESTDIR=" + testLocationBuild ,
214
- "--build-arg" , "BASEIMAGE=" + baseImageName ,
215
- "--build-arg" , "NAMESPACEDMAN=" + namespacedManBuild )
216
- err = projutil .ExecCmd (testBuildCmd )
207
+ err = projutil .DockerBuild (testDockerfile , image ,
208
+ "TESTDIR=" + testLocationBuild ,
209
+ "BASEIMAGE=" + baseImageName ,
210
+ "NAMESPACEDMAN=" + namespacedManBuild )
217
211
if err != nil {
218
212
log .Fatalf ("failed to output test image %s: (%v)" , image , err )
219
213
}
0 commit comments