mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-01 03:07:51 +08:00
use GetImageUserInfo
This commit is contained in:
parent
be6d0fe14b
commit
fcbb34e3f3
@ -68,11 +68,7 @@ func (e *exectorManager) pluginImageBuild(task *pb.TaskMessage) {
|
||||
}
|
||||
|
||||
func (e *exectorManager) run(t *model.BuildPluginTaskBody, logger event.Logger) error {
|
||||
hubUser, hubPass := t.ImageInfo.HubUser, t.ImageInfo.HubPassword
|
||||
if hubUser == "" || hubPass == "" {
|
||||
hubUser = builder.REGISTRYUSER
|
||||
hubPass = builder.REGISTRYPASS
|
||||
}
|
||||
hubUser, hubPass := builder.GetImageUserInfo(t.ImageInfo.HubUser, t.ImageInfo.HubPassword)
|
||||
if _, err := sources.ImagePull(e.DockerClient, t.ImageURL, hubUser, hubPass, logger, 10); err != nil {
|
||||
logrus.Errorf("pull image %v error, %v", t.ImageURL, err)
|
||||
logger.Error("拉取镜像失败", map[string]string{"step": "builder-exector", "status": "failure"})
|
||||
|
Loading…
Reference in New Issue
Block a user