This commit is contained in:
parent
8037af77e9
commit
3066e29a96
29
.drone.yml
29
.drone.yml
@ -4,7 +4,30 @@ name: "drone-dagger-test"
|
||||
|
||||
steps:
|
||||
- name: "build"
|
||||
image: harbor.front.kjuulh.io/docker-proxy/library/golang:latest
|
||||
image: harbor.front.kjuulh.io/docker-proxy/library/docker:dind
|
||||
environment:
|
||||
DOCKER_BUILDKIT: 1
|
||||
commands:
|
||||
- "go run main.go https://github.com/kpenfound/greetings-api.git"
|
||||
- "go test ./..."
|
||||
- "sleep 5"
|
||||
- docker build -t dagger-test-builder .
|
||||
|
||||
- name: "run-pipeline"
|
||||
image: harbor.front.kjuulh.io/docker-proxy/library/docker:dind
|
||||
environment:
|
||||
DOCKER_BUILDKIT: 1
|
||||
depends_on:
|
||||
- "build"
|
||||
commands:
|
||||
- "docker run dagger-test-builder ./dagger 'https://github.com/kpenfound/greetings-api.git'"
|
||||
|
||||
services:
|
||||
- name: docker
|
||||
image: docker:dind
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
|
||||
volumes:
|
||||
- name: dockersock
|
||||
temp: {}
|
||||
|
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM harbor.front.kjuulh.io/docker-proxy/library/golang as builder
|
||||
|
||||
WORKDIR /src/builder
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go build -o dist/dagger main.go
|
||||
|
||||
FROM harbor.front.kjuulh.io/docker-proxy/library/docker:dind
|
||||
|
||||
WORKDIR /src/docker
|
||||
|
||||
COPY --from=builder /src/builder/dist/dagger .
|
Loading…
Reference in New Issue
Block a user