try new release
This commit is contained in:
parent
bfa0eba29d
commit
55ea4a468f
@ -26,6 +26,7 @@ func main() {
|
|||||||
},
|
},
|
||||||
BuildPath: "main.go",
|
BuildPath: "main.go",
|
||||||
BinName: "dagger-go",
|
BinName: "dagger-go",
|
||||||
|
BaseImage: "harbor.front.kjuulh.io/docker-proxy/library/docker:dind",
|
||||||
}).
|
}).
|
||||||
Execute(ctx)
|
Execute(ctx)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ name: "drone-dagger-test"
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "build"
|
- name: "build"
|
||||||
image: harbor.front.kjuulh.io/kjuulh/dagger-go:latest
|
image: harbor.front.kjuulh.io/kjuulh/dagger-go:1667159344332
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
@ -17,8 +17,6 @@ steps:
|
|||||||
from_secret: "harbor_docker_password"
|
from_secret: "harbor_docker_password"
|
||||||
commands:
|
commands:
|
||||||
- sleep 5
|
- sleep 5
|
||||||
- ls -la /usr/bin
|
|
||||||
- cp /usr/bin/dagger-go /dagger-go
|
|
||||||
- sh -c "/dagger-go build golangbin"
|
- sh -c "/dagger-go build golangbin"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -85,21 +85,18 @@ func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline {
|
|||||||
usrbin := fmt.Sprintf("/usr/bin/%s", opts.BinName)
|
usrbin := fmt.Sprintf("/usr/bin/%s", opts.BinName)
|
||||||
c := container.MountFileFromLoaded(scratch, bin, tempmount)
|
c := container.MountFileFromLoaded(scratch, bin, tempmount)
|
||||||
c = c.Exec(dagger.ContainerExecOpts{
|
c = c.Exec(dagger.ContainerExecOpts{
|
||||||
Args: []string{"mkdir", "-p", "/usr/bin"},
|
Args: []string{"mkdir", "-p", "/usr/bin", "&&", "cp", tempmount, usrbin},
|
||||||
})
|
|
||||||
c = c.Exec(dagger.ContainerExecOpts{
|
|
||||||
Args: []string{"cp", tempmount, usrbin},
|
|
||||||
})
|
})
|
||||||
finalImage = c.WithEntrypoint([]string{opts.BinName})
|
finalImage = c.WithEntrypoint([]string{opts.BinName})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
byg.Step{
|
//byg.Step{
|
||||||
Execute: func(_ byg.Context) error {
|
// Execute: func(_ byg.Context) error {
|
||||||
return golang.Test(ctx, build)
|
// return golang.Test(ctx, build)
|
||||||
},
|
// },
|
||||||
},
|
//},
|
||||||
).
|
).
|
||||||
Step(
|
Step(
|
||||||
"upload-image",
|
"upload-image",
|
||||||
|
Loading…
Reference in New Issue
Block a user