From d90cbb8ff43736cc709b8a386d7ce7310ffcdde1 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Mon, 31 Oct 2022 00:21:58 +0100 Subject: [PATCH] with actual name --- gobin_default_template.yaml | 7 ++++++- pkg/cli/build_golang_bin.go | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gobin_default_template.yaml b/gobin_default_template.yaml index 92d58e4..94649a4 100644 --- a/gobin_default_template.yaml +++ b/gobin_default_template.yaml @@ -4,7 +4,7 @@ name: "drone-dagger-test" steps: - name: "build" - image: harbor.front.kjuulh.io/kjuulh/dagger-go:1667165924347 + image: harbor.front.kjuulh.io/kjuulh/dagger-go:1667171629427 volumes: - name: dockersock path: /var/run @@ -17,6 +17,11 @@ steps: from_secret: "harbor_docker_password" commands: - sleep 5 + - > + echo "$${HARBOR_DOCKER_PASSWORD}" | docker login + --password-stdin + --username="$${HARBOR_DOCKER_USERNAME}" + "$${HARBOR_DOCKER_HOST}" - dagger-go build golangbin services: diff --git a/pkg/cli/build_golang_bin.go b/pkg/cli/build_golang_bin.go index efe2bad..0405236 100644 --- a/pkg/cli/build_golang_bin.go +++ b/pkg/cli/build_golang_bin.go @@ -2,7 +2,6 @@ package cli import ( "errors" - "fmt" "os" "git.front.kjuulh.io/kjuulh/dagger-go/pkg/builder" @@ -18,7 +17,6 @@ func BuildGolangBin() *cobra.Command { if repoName == "" { return errors.New("could not find DRONE_REPO_NAME") } - imageTag := fmt.Sprintf("harbor.front.kjuulh.io/library/%s", repoName) ctx := cmd.Context() @@ -32,7 +30,7 @@ func BuildGolangBin() *cobra.Command { New(builder). WithGolangBin(&pipelines.GolangBinOpts{ DockerImageOpt: &pipelines.DockerImageOpt{ - ImageName: imageTag, + ImageName: repoName, }, BuildPath: "main.go", BinName: "main",