[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:
|
steps:
|
||||||
|
|
||||||
# build and publish
|
# build and publish
|
||||||
- image: 'docker.io/library/docker:dind'
|
- image: 'plugins/docker'
|
||||||
name: 'publish'
|
name: 'publish'
|
||||||
pull: 'always'
|
pull: 'always'
|
||||||
privileged: true
|
privileged: true
|
||||||
command: [ '-H', 'unix:///var/run/docker.sock' ]
|
settings:
|
||||||
|
|
||||||
environment:
|
# registery and repos
|
||||||
DOCKER_USERNAME:
|
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'
|
from_secret: 'docker_username'
|
||||||
DOCKER_PASSWORD:
|
password:
|
||||||
from_secret: 'docker_password'
|
from_secret: 'docker_password'
|
||||||
|
|
||||||
commands:
|
# tags
|
||||||
- 'sleep 10'
|
tags:
|
||||||
- 'docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker.io'
|
- 'v0.9'
|
||||||
- 'export DOCKER_HOST=unix:///var/run/docker.sock'
|
- 'latest'
|
||||||
- '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'
|
|
||||||
|
Loading…
Reference in New Issue
Block a user