From cc11c392aed8f282686f63513e29680fee8954ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Fri, 9 Jul 2021 16:00:30 +0200 Subject: [PATCH] use dind --- .drone.yml | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index ca80548..57b3682 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,15 +2,29 @@ kind: pipeline type: docker name: default steps: - - name: kaniko - image: banzaicloud/drone-kaniko - settings: - registry: registry.kmlabz.com - repo: tormakris/${DRONE_REPO_NAME} - username: + - name: build-image + image: docker:dind + volumes: + - name: dockersock + path: /var/run + environment: + DOCKER_USERNAME: from_secret: DOCKER_USERNAME - password: + DOCKER_PASSWORD: from_secret: DOCKER_PASSWORD - tags: - - latest - - ${DRONE_BUILD_NUMBER} \ No newline at end of file + commands: + - sleep 10 + - echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin registry.kmlabz.com + - docker build -t registry.kmlabz.com/tormakris/drone-kaniko + - docker push registry.kmlabz.com/tormakris/drone-kaniko + +services: +- name: docker + image: docker:dind + privileged: true + volumes: + - name: dockersock + path: /var/run +volumes: +- name: dockersock + temp: {} \ No newline at end of file