ansible-deployment-container/.drone.yml
Simon Cornet 48ca4e9755
Some checks failed
continuous-integration/drone/push Build is failing
[DRONE] Rewrite build and publish CI
2022-10-07 12:53:51 +02:00

30 lines
753 B
YAML

---
kind: 'pipeline'
name: 'build'
type: 'kubernetes'
steps:
# build and publish
- image: 'docker.io/library/docker:dind'
name: 'publish'
pull: 'always'
privileged: true
volumes:
- name: dockersock
path: /var/run
environment:
DOCKER_USERNAME:
from_secret: 'docker_username'
DOCKER_PASSWORD:
from_secret: 'docker_password'
commands:
- 'sleep 1'
- 'docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker.io'
- 'export DOCKER_HOST="tcp://localhost:2375"'
- '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'