From 58c4e296ea2929de1b338a538c0e0f4b7cb36ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Tue, 28 Apr 2020 20:53:51 +0200 Subject: [PATCH] use custom dind to build doc container image --- .drone.yml | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5097b2f..b62534f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,20 +40,23 @@ steps: - cd docs - make html -- name: build-docs - image: banzaicloud/drone-kaniko - settings: - registry: registry.kmlabz.com - dockerfile: docs/Dockerfile - context: ${PWD}/docs/ - repo: goldenpogacsa/consumer-api-docs - username: +- name: build_docs + image: docker:stable-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} + commands: + - cd docs + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin registry.kmlabz.com + - docker build -t="registry.kmlabz.com/goldenpogacsa/producer-docs" . + - docker build -t="registry.kmlabz.com/goldenpogacsa/producer-docs:$DRONE_BUILD_NUMBER" . + - docker push "registry.kmlabz.com/goldenpogacsa/producer-docs" + - docker push "registry.kmlabz.com/goldenpogacsa/producer-docs:$DRONE_BUILD_NUMBER" - name: slack image: plugins/slack @@ -64,3 +67,15 @@ steps: icon_url: https://cloudcdn.tormakristof.eu/static/drone.svg when: status: [ failure ] + +services: +- name: docker + image: docker:stable-dind + privileged: true + volumes: + - name: dockersock + path: /var/run + +volumes: +- name: dockersock + temp: {}