Updated to image thwich can handle musl
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4e10b5c543
commit
9c8a3719ce
@ -41,7 +41,27 @@ func (p *Pipeline) WithRustBin(opts *RustBinOpts) *Pipeline {
|
|||||||
c := container.LoadImage(client, "harbor.server.kjuulh.io/docker-proxy/library/rust:buster")
|
c := container.LoadImage(client, "harbor.server.kjuulh.io/docker-proxy/library/rust:buster")
|
||||||
c = c.Exec(dagger.ContainerExecOpts{
|
c = c.Exec(dagger.ContainerExecOpts{
|
||||||
Args: []string{
|
Args: []string{
|
||||||
"apt install musl-tools",
|
"apt", "update", "-y",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if _, err := c.ExitCode(ctx); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
c = c.Exec(dagger.ContainerExecOpts{
|
||||||
|
Args: []string{
|
||||||
|
"apt", "install", "musl-tools", "-y",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if _, err := c.ExitCode(ctx); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
c = c.Exec(dagger.ContainerExecOpts{
|
||||||
|
Args: []string{
|
||||||
|
"rustup",
|
||||||
|
"target",
|
||||||
|
"add",
|
||||||
|
"x86_64-unknown-linux-musl",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if _, err := c.ExitCode(ctx); err != nil {
|
if _, err := c.ExitCode(ctx); err != nil {
|
||||||
|
@ -11,18 +11,6 @@ import (
|
|||||||
func Build(ctx context.Context, container *dagger.Container, binName string) (dagger.FileID, error) {
|
func Build(ctx context.Context, container *dagger.Container, binName string) (dagger.FileID, error) {
|
||||||
log.Printf("building binary: (binName=%s)", binName)
|
log.Printf("building binary: (binName=%s)", binName)
|
||||||
c := container.Exec(dagger.ContainerExecOpts{
|
c := container.Exec(dagger.ContainerExecOpts{
|
||||||
Args: []string{
|
|
||||||
"rustup",
|
|
||||||
"target",
|
|
||||||
"add",
|
|
||||||
"x86_64-unknown-linux-musl",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
if _, err := c.ExitCode(ctx); err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
|
|
||||||
c = c.Exec(dagger.ContainerExecOpts{
|
|
||||||
Args: []string{
|
Args: []string{
|
||||||
"cargo",
|
"cargo",
|
||||||
"build",
|
"build",
|
||||||
|
@ -4,7 +4,7 @@ name: "drone-dagger-test"
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "build"
|
- name: "build"
|
||||||
image: harbor.server.kjuulh.io/kjuulh/bust:1667692696139
|
image: harbor.server.kjuulh.io/kjuulh/bust:166769342945
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
|
Loading…
Reference in New Issue
Block a user