with log statement
This commit is contained in:
parent
7cb736fa33
commit
bfa0eba29d
@ -10,6 +10,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
log.Printf("building dagger-go")
|
||||||
|
|
||||||
err := cli.NewCustomGoBuild("golangbin", func(ctx context.Context) error {
|
err := cli.NewCustomGoBuild("golangbin", func(ctx context.Context) error {
|
||||||
builder, err := builder.New(ctx)
|
builder, err := builder.New(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -4,7 +4,7 @@ name: "drone-dagger-test"
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "build"
|
- name: "build"
|
||||||
image: harbor.front.kjuulh.io/docker-proxy/library/docker:dind
|
image: harbor.front.kjuulh.io/kjuulh/dagger-go:latest
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
@ -17,25 +17,9 @@ steps:
|
|||||||
from_secret: "harbor_docker_password"
|
from_secret: "harbor_docker_password"
|
||||||
commands:
|
commands:
|
||||||
- sleep 5
|
- sleep 5
|
||||||
echo "$${HARBOR_DOCKER_PASSWORD}" | docker login
|
- ls -la /usr/bin
|
||||||
--password-stdin
|
- cp /usr/bin/dagger-go /dagger-go
|
||||||
--username="$${HARBOR_DOCKER_USERNAME}"
|
- sh -c "/dagger-go build golangbin"
|
||||||
"$${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'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- name: docker
|
- name: docker
|
||||||
@ -48,3 +32,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
temp: {}
|
temp: {}
|
||||||
|
|
||||||
|
image_pull_secrets:
|
||||||
|
- dockerconfig
|
||||||
|
Loading…
Reference in New Issue
Block a user