with log statement

This commit is contained in:
Kasper Juul Hermansen 2022-10-30 20:46:13 +01:00
parent 7cb736fa33
commit bfa0eba29d
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
2 changed files with 9 additions and 20 deletions

View File

@ -10,6 +10,8 @@ import (
)
func main() {
log.Printf("building dagger-go")
err := cli.NewCustomGoBuild("golangbin", func(ctx context.Context) error {
builder, err := builder.New(ctx)
if err != nil {

View File

@ -4,7 +4,7 @@ name: "drone-dagger-test"
steps:
- name: "build"
image: harbor.front.kjuulh.io/docker-proxy/library/docker:dind
image: harbor.front.kjuulh.io/kjuulh/dagger-go:latest
volumes:
- name: dockersock
path: /var/run
@ -17,25 +17,9 @@ steps:
from_secret: "harbor_docker_password"
commands:
- sleep 5
echo "$${HARBOR_DOCKER_PASSWORD}" | docker login
--password-stdin
--username="$${HARBOR_DOCKER_USERNAME}"
"$${HARBOR_DOCKER_HOST}"
- docker pull harbor.front.kjuulh.io/kjuulh/dagger-go:latest
- >
docker run
-e DRONE_REPO_NAME="${DRONE_REPO_NAME}"
-e HARBOR_DOCKER_HOST=$${HARBOR_DOCKER_HOST}
-e HARBOR_DOCKER_USERNAME=$${HARBOR_DOCKER_USERNAME}
-e HARBOR_DOCKER_PASSWORD=$${HARBOR_DOCKER_PASSWORD}
-v "$PWD/:/src/"
-v /var/run/docker.sock:/var/run/docker.sock
harbor.front.kjuulh.io/kjuulh/dagger-go:latest
sh -c 'echo "$$HARBOR_DOCKER_PASSWORD" | docker login
--password-stdin
--username="$$HARBOR_DOCKER_USERNAME"
"$${HARBOR_DOCKER_HOST}"
&& dagger-go build golangbin'
- ls -la /usr/bin
- cp /usr/bin/dagger-go /dagger-go
- sh -c "/dagger-go build golangbin"
services:
- name: docker
@ -48,3 +32,6 @@ services:
volumes:
- name: dockersock
temp: {}
image_pull_secrets:
- dockerconfig