diff --git a/.drone.yml b/.drone.yml index 32ca62a..2db6a3e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,30 +6,22 @@ type: 'kubernetes' steps: # build and publish -- image: 'plugins/docker' - name: 'publish' +- name: 'publish' + image: 'docker.io/library/docker' pull: 'always' - settings: - # registery and repos - registry: 'docker.io' - cache_from: 'rakepanorama/ansible-deployment' - repo: 'rakepanorama/ansible-deployment' - custom_dns: '8.8.8.8' - build_args: '--network host' - debug: true - - # build stuff - dockerfile: 'Dockerfile.linux.amd64' - daemon_off: 'false' - - # authentication - username: + environment: + IMG: 'rakepanorama/ansible-deployment-container' + DOCKER_USER: from_secret: 'docker_username' - password: + DOCKER_PASS: from_secret: 'docker_password' - # tags - tags: - - 'v0.9' - - 'latest' + volumes: + - '/var/run/docker.sock:/var/run/docker.sock' + + commands: + - 'echo building image ${IMG}' + - 'docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} docker.io' + - 'docker build -t ${IMG}:v0.9 -t ${IMG}:latest -f Dockerfile.linux.amd64 .' + - 'docker push -a'