mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-03 04:07:51 +08:00
pull image runner
This commit is contained in:
parent
724b405bab
commit
b4989cf802
@ -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
|
||||
|
@ -94,3 +94,4 @@ func TestImagePull(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user