diff --git a/.drone.yml b/.drone.yml index 2475c3f..ffb8541 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,21 +6,31 @@ type: 'kubernetes' steps: # build and publish -- image: 'docker.io/library/docker:dind' +- image: 'plugins/docker' name: 'publish' pull: 'always' privileged: true - command: [ '-H', 'unix:///var/run/docker.sock' ] + settings: - environment: - DOCKER_USERNAME: + # registery and repos + registry: 'docker.io' + cache_from: 'rakepanorama/ansible-deployment' + repo: 'rakepanorama/ansible-deployment' + custom_dns: '192.168.10.254' + build_args: '--network host' + debug: true + + # build stuff + dockerfile: 'Dockerfile.linux.amd64' + daemon_off: 'false' + + # authentication + username: from_secret: 'docker_username' - DOCKER_PASSWORD: + password: from_secret: 'docker_password' - commands: - - 'sleep 10' - - 'docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker.io' - - 'export DOCKER_HOST=unix:///var/run/docker.sock' - - 'docker build --network host -t rakepanorama/ansible-deployment-container:v0.9 -t rakepanorama/ansible-deployment-container:latest -f Dockerfile.linux.amd64 .' - - 'docker push -a rakepanorama/ansible-deployment-container' + # tags + tags: + - 'v0.9' + - 'latest'