Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
fix for release
Browse files Browse the repository at this point in the history
  • Loading branch information
VJftw committed Jun 19, 2019
1 parent 478a151 commit 4d87103
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .velocityci/blueprints/backend/cli/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steps:
workingDir: backend
mountPoint: /app
environment:
GIT_DESCRIBE: ${GIT_DESCRIBE}
GIT_DESCRIBE: ${git.describe}
command: ./scripts/build-cli.sh

- description: Upload linux_amd64 release binary
Expand All @@ -24,12 +24,12 @@ steps:
workingDir: backend
environment:
GITHUB_ACCESS_TOKEN: ${github_release_token}
command: velocity-ci velocity ${GIT_DESCRIBE} dist/vcli_linux_amd64
command: velocity-ci velocity ${git.describe} dist/vcli_linux_amd64

- description: Upload darwin_amd64 release binary
type: run
image: civelocity/run.github-release
workingDir: backend
environment:
GITHUB_ACCESS_TOKEN: ${github_release_token}
command: velocity-ci velocity ${GIT_DESCRIBE} dist/vcli_darwin_amd64
command: velocity-ci velocity ${git.describe} dist/vcli_darwin_amd64
7 changes: 6 additions & 1 deletion backend/pkg/velocity/docker/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,13 @@ func (sR *ServiceRunner) PullOrBuild(authConfigs map[string]types.AuthConfig, ad
)
if err != nil {
logging.GetLogger().Error("could not pull image", zap.String("image", sR.image), zap.String("err", err.Error()))
fmt.Fprintf(sR.writer, output.ColorFmt(output.ANSIError, "-> could not pull image: %s", "\n"), err.Error())
return
}
defer pullResp.Close()
HandleOutput(pullResp, sR.secrets, sR.writer)

fmt.Fprintf(sR.writer, output.ColorFmt(output.ANSIInfo, "-> pulled image: %s", "\n"), sR.image)

}
}

Expand Down Expand Up @@ -265,5 +266,9 @@ func resolvePullImage(image string) string {
return image
}

if len(parts) > 0 {
return fmt.Sprintf("docker.io/%s", image)
}

return fmt.Sprintf("docker.io/library/%s", image)
}

0 comments on commit 4d87103

Please sign in to comment.