Commit 9999e03d authored by duanjinfei's avatar duanjinfei

fix foundImgageName

parent 588db8db
...@@ -249,13 +249,14 @@ func (t *TaskWorker) foundTaskImage(taskCmd *models.TaskCmd) (imageId string) { ...@@ -249,13 +249,14 @@ func (t *TaskWorker) foundTaskImage(taskCmd *models.TaskCmd) (imageId string) {
imageId = "" imageId = ""
return return
} }
foundImageName := fmt.Sprintf("%s-%s", taskCmd.ImageName, conf.GetConfig().OpSys)
isFound := false isFound := false
for _, image := range images { for _, image := range images {
if isFound { if isFound {
break break
} }
for _, tag := range image.RepoTags { for _, tag := range image.RepoTags {
if tag == taskCmd.ImageName { if tag == foundImageName {
imageId = image.ID imageId = image.ID
isFound = true isFound = true
log.Info("The image found success:", image.ID) log.Info("The image found success:", image.ID)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment