with tasks
This commit is contained in:
parent
165554ee15
commit
626e7bec93
@ -18,7 +18,7 @@ steps:
|
||||
- mkdir -p tmp/dagger-go
|
||||
- git clone "https://git.front.kjuulh.io/kjuulh/dagger-go.git" tmp/dagger-go
|
||||
- docker build -t dagger-go-builder:${DRONE_COMMIT} -f tmp/dagger-go/Dockerfile .
|
||||
- 'docker run -v /var/run/docker.sock:/var/run/docker.sock dagger-go-builder:${DRONE_COMMIT} ./dagger-go build {{ or .input.imageTag $imageTag }}'
|
||||
- 'docker run -v /var/run/docker.sock:/var/run/docker.sock dagger-go-builder:${DRONE_COMMIT} ./dagger-go build "{{ or .input.imageTag $imageTag }}"'
|
||||
|
||||
services:
|
||||
- name: docker
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"git.front.kjuulh.io/kjuulh/dagger-go/pkg/tasks"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@ -23,7 +24,11 @@ func Build(requirementsf func(*cobra.Command), buildf func(ctx context.Context)
|
||||
log.Printf("Building image: %s\n", imageTag)
|
||||
}
|
||||
|
||||
if buildf != nil {
|
||||
return buildf(cmd.Context())
|
||||
}
|
||||
|
||||
return tasks.Build(imageTag)
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user