[DRONE] Rewrite build and publish CI
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
893cf63142
commit
9af2f8ec4d
32
.drone.yml
32
.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'
|
||||
|
Loading…
Reference in New Issue
Block a user