[DRONE] Rewrite build and publish CI
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Simon Cornet 2022-10-07 14:01:55 +02:00
parent 560ca45bd1
commit 6287a40649

View File

@ -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'