with actual name
This commit is contained in:
parent
b06ed52413
commit
d90cbb8ff4
@ -4,7 +4,7 @@ name: "drone-dagger-test"
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "build"
|
- name: "build"
|
||||||
image: harbor.front.kjuulh.io/kjuulh/dagger-go:1667165924347
|
image: harbor.front.kjuulh.io/kjuulh/dagger-go:1667171629427
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
@ -17,6 +17,11 @@ steps:
|
|||||||
from_secret: "harbor_docker_password"
|
from_secret: "harbor_docker_password"
|
||||||
commands:
|
commands:
|
||||||
- sleep 5
|
- sleep 5
|
||||||
|
- >
|
||||||
|
echo "$${HARBOR_DOCKER_PASSWORD}" | docker login
|
||||||
|
--password-stdin
|
||||||
|
--username="$${HARBOR_DOCKER_USERNAME}"
|
||||||
|
"$${HARBOR_DOCKER_HOST}"
|
||||||
- dagger-go build golangbin
|
- dagger-go build golangbin
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -2,7 +2,6 @@ package cli
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"git.front.kjuulh.io/kjuulh/dagger-go/pkg/builder"
|
"git.front.kjuulh.io/kjuulh/dagger-go/pkg/builder"
|
||||||
@ -18,7 +17,6 @@ func BuildGolangBin() *cobra.Command {
|
|||||||
if repoName == "" {
|
if repoName == "" {
|
||||||
return errors.New("could not find DRONE_REPO_NAME")
|
return errors.New("could not find DRONE_REPO_NAME")
|
||||||
}
|
}
|
||||||
imageTag := fmt.Sprintf("harbor.front.kjuulh.io/library/%s", repoName)
|
|
||||||
|
|
||||||
ctx := cmd.Context()
|
ctx := cmd.Context()
|
||||||
|
|
||||||
@ -32,7 +30,7 @@ func BuildGolangBin() *cobra.Command {
|
|||||||
New(builder).
|
New(builder).
|
||||||
WithGolangBin(&pipelines.GolangBinOpts{
|
WithGolangBin(&pipelines.GolangBinOpts{
|
||||||
DockerImageOpt: &pipelines.DockerImageOpt{
|
DockerImageOpt: &pipelines.DockerImageOpt{
|
||||||
ImageName: imageTag,
|
ImageName: repoName,
|
||||||
},
|
},
|
||||||
BuildPath: "main.go",
|
BuildPath: "main.go",
|
||||||
BinName: "main",
|
BinName: "main",
|
||||||
|
Loading…
Reference in New Issue
Block a user