ansible-deployment-container/.drone.yml
Simon Cornet c1e50f4371
Some checks reported errors
continuous-integration/drone/push Build encountered an error
[DRONE] Rewrite build and publish CI
2022-10-07 14:03:04 +02:00

28 lines
610 B
YAML

---
kind: 'pipeline'
name: 'build'
type: 'kubernetes'
steps:
# build and publish
- name: 'publish'
image: 'docker.io/library/docker'
pull: 'always'
environment:
IMG: 'rakepanorama/ansible-deployment-container'
DOCKER_USER:
from_secret: 'docker_username'
DOCKER_PASS:
from_secret: 'docker_password'
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'