From 55ea4a468ff8635253f9a53ae7629e12951ad10e Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sun, 30 Oct 2022 21:06:25 +0100 Subject: [PATCH] try new release --- ci/main.go | 1 + gobin_default_template.yaml | 4 +--- pkg/pipelines/golang-bin.go | 15 ++++++--------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ci/main.go b/ci/main.go index 978f807..19fc553 100644 --- a/ci/main.go +++ b/ci/main.go @@ -26,6 +26,7 @@ func main() { }, BuildPath: "main.go", BinName: "dagger-go", + BaseImage: "harbor.front.kjuulh.io/docker-proxy/library/docker:dind", }). Execute(ctx) diff --git a/gobin_default_template.yaml b/gobin_default_template.yaml index b76eada..e5b9f07 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:latest + image: harbor.front.kjuulh.io/kjuulh/dagger-go:1667159344332 volumes: - name: dockersock path: /var/run @@ -17,8 +17,6 @@ steps: from_secret: "harbor_docker_password" commands: - sleep 5 - - ls -la /usr/bin - - cp /usr/bin/dagger-go /dagger-go - sh -c "/dagger-go build golangbin" services: diff --git a/pkg/pipelines/golang-bin.go b/pkg/pipelines/golang-bin.go index 505e689..0b1ac39 100644 --- a/pkg/pipelines/golang-bin.go +++ b/pkg/pipelines/golang-bin.go @@ -85,21 +85,18 @@ func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline { usrbin := fmt.Sprintf("/usr/bin/%s", opts.BinName) c := container.MountFileFromLoaded(scratch, bin, tempmount) c = c.Exec(dagger.ContainerExecOpts{ - Args: []string{"mkdir", "-p", "/usr/bin"}, - }) - c = c.Exec(dagger.ContainerExecOpts{ - Args: []string{"cp", tempmount, usrbin}, + Args: []string{"mkdir", "-p", "/usr/bin", "&&", "cp", tempmount, usrbin}, }) finalImage = c.WithEntrypoint([]string{opts.BinName}) return nil }, }, - byg.Step{ - Execute: func(_ byg.Context) error { - return golang.Test(ctx, build) - }, - }, + //byg.Step{ + // Execute: func(_ byg.Context) error { + // return golang.Test(ctx, build) + // }, + //}, ). Step( "upload-image",