27 lines
754 B
YAML
27 lines
754 B
YAML
---
|
|
kind: 'pipeline'
|
|
name: 'build'
|
|
type: 'kubernetes'
|
|
|
|
steps:
|
|
|
|
# build and publish
|
|
- image: 'docker.io/library/docker:dind'
|
|
name: 'publish'
|
|
pull: 'always'
|
|
privileged: true
|
|
command: [ '-H', 'unix:///drone/docker.sock' ]
|
|
|
|
environment:
|
|
DOCKER_USERNAME:
|
|
from_secret: 'docker_username'
|
|
DOCKER_PASSWORD:
|
|
from_secret: 'docker_password'
|
|
|
|
commands:
|
|
- 'sleep 10'
|
|
- 'docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker.io'
|
|
- 'export DOCKER_HOST=unix:///drone/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'
|