Merge pull request #787 from GLYASAI/V5.2

fix image pull bug
This commit is contained in:
黄润豪 2020-06-11 15:45:02 +08:00 committed by GitHub
commit 6a22bffff5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,8 +73,7 @@ func NewImageBuildItem(in []byte) *ImageBuildItem {
//Run Run
func (i *ImageBuildItem) Run(timeout time.Duration) error {
user, password := builder.GetImageUserInfo(i.HubUser, i.HubPassword)
_, err := sources.ImagePull(i.DockerClient, i.Image, user, password, i.Logger, 30)
_, err := sources.ImagePull(i.DockerClient, i.Image, i.HubUser, i.HubPassword, i.Logger, 30)
if err != nil {
logrus.Errorf("pull image %s error: %s", i.Image, err.Error())
i.Logger.Error(fmt.Sprintf("获取指定镜像: %s失败", i.Image), map[string]string{"step": "builder-exector", "status": "failure"})