This commit is contained in:
Kasper Juul Hermansen 2022-10-30 19:03:49 +01:00
parent 5d9a6296f1
commit fb2c3f4598
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23

View File

@ -10,10 +10,16 @@ steps:
path: /var/run
environment:
DOCKER_BUILDKIT: 1
HARBOR_DOCKER_HOST: "harbor.front.kjuulh.io"
HARBOR_DOCKER_USERNAME:
secret: "harbor_docker_username"
HARBOR_DOCKER_PASSWORD:
secret: "harbor_docker_password"
commands:
- "sleep 5"
- apk add git
- mkdir -p tmp/dagger-go
- 'echo "$HARBOR_DOCKER_PASSWORD" | docker login --username "$HARBOR_DOCKER_USERNAME" --password-stdin "$HARBOR_DOCKER_HOST"'
- 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 "$PWD/:/src/" -e DRONE_REPO_NAME="${DRONE_REPO_NAME}" -v /var/run/docker.sock:/var/run/docker.sock dagger-go-builder:${DRONE_COMMIT} dagger-go build golangbin'