@@ -209,15 +209,20 @@ func (p Plugin) Exec() error {
209
209
}
210
210
}
211
211
212
- cmds = append (cmds , commandBuild (p .Build )) // docker build
213
-
212
+ // XXX Dryrun mode is broken now
214
213
for _ , tag := range p .Build .Tags {
215
- cmds = append (cmds , commandTag (p .Build , tag )) // docker tag
214
+ cmds = append (cmds , commandBuild (p .Build , tag )) // docker build and push
215
+ }
216
+
217
+ /*
218
+ for _, tag := range p.Build.Tags {
219
+ cmds = append(cmds, commandTag(p.Build, tag)) // docker tag
216
220
217
- if ! p .Dryrun {
218
- cmds = append (cmds , commandPush (p .Build , tag )) // docker push
221
+ if !p.Dryrun {
222
+ cmds = append(cmds, commandPush(p.Build, tag)) // docker push
223
+ }
219
224
}
220
- }
225
+ */
221
226
222
227
// execute all commands in batch mode.
223
228
for _ , cmd := range cmds {
@@ -324,14 +329,15 @@ func commandInfo() *exec.Cmd {
324
329
}
325
330
326
331
// helper function to create the docker build command.
327
- func commandBuild (build Build ) * exec.Cmd {
332
+ func commandBuild (build Build , tag string ) * exec.Cmd {
333
+ target := fmt .Sprintf ("%s:%s" , build .Repo , tag )
328
334
args := []string {
329
335
"build" ,
330
336
"--rm=true" ,
331
337
"-f" , build .Dockerfile ,
332
- "-t" , build . TempTag ,
338
+ "-t" , target ,
333
339
// experiment to make go fast
334
- "--output=type=image,compression=zstd,compression-level=-7 " ,
340
+ "--output=type=image,compression=zstd,compression-level=3,force-compression=true,push=true " ,
335
341
}
336
342
337
343
args = append (args , build .Context )
0 commit comments