Skip to content

Commit

Permalink
tests: actualize
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-igrychev committed Sep 15, 2021
1 parent 1861ec4 commit 955578f
Showing 1 changed file with 4 additions and 6 deletions.
Expand Up @@ -7,6 +7,7 @@ import (
"strings"
"sync"

"github.com/gookit/color"
"github.com/otiai10/copy"
"github.com/werf/werf/integration/pkg/utils"
"github.com/werf/werf/integration/pkg/utils/liveexec"
Expand All @@ -30,16 +31,13 @@ func ExtractStageInfoFromOutputLine(stageInfo *StageInfo, line string) *StageInf
}

fields := strings.Fields(line)
if strings.Contains(line, "image_id: ") {
if strings.Contains(line, "id: ") {
stageInfo.ImageID = fields[len(fields)-1]
}
if strings.Contains(line, "repository: ") {
stageInfo.Repository = fields[len(fields)-1]
}
if strings.Contains(line, "name: ") {
nameParts := strings.Split(fields[len(fields)-1], ":")
stageInfo.Repository = nameParts[0]
stageInfo.Tag = nameParts[1]
stageInfo.Repository = color.ClearCode(nameParts[0])
stageInfo.Tag = color.ClearCode(nameParts[1])

sigAndID := strings.SplitN(stageInfo.Tag, "-", 2)
stageInfo.Digest = sigAndID[0]
Expand Down

0 comments on commit 955578f

Please sign in to comment.