pull image runner

This commit is contained in:
GLYASAI 2020-04-16 17:10:47 +08:00
parent 724b405bab
commit b4989cf802
2 changed files with 8 additions and 0 deletions

View File

@ -365,6 +365,13 @@ func ImageBuild(dockerCli *client.Client, contextDir string, options types.Image
if err != nil {
return err
}
// pull image runner
if _, err := ImagePull(dockerCli, builder.RUNNERIMAGENAME, builder.REGISTRYUSER, builder.REGISTRYPASS, logger, timeout); err != nil {
return fmt.Errorf("pull image %s: %v", builder.RUNNERIMAGENAME, err)
}
logrus.Infof("pull image %s successfully.", builder.RUNNERIMAGENAME)
rc, err := dockerCli.ImageBuild(ctx, buildCtx, options)
if err != nil {
return err

View File

@ -94,3 +94,4 @@ func TestImagePull(t *testing.T) {
t.Fatal(err)
}
}