type: docker
kind: pipeline
name: "drone-dagger-test"

steps:
  - name: "build"
    image: harbor.front.kjuulh.io/docker-proxy/library/docker:dind
    volumes:
      - name: dockersock
        path: /var/run
    environment:
      DOCKER_BUILDKIT: 1
    commands:
      - "sleep 5"
      - docker build -t dagger-test-builder:${DRONE_COMMIT} .
      - "docker run -v /var/run/docker.sock:/var/run/docker.sock dagger-test-builder:${DRONE_COMMIT} ./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: {}
