ansible-deployment-container/.drone.yml

35 lines
753 B
YAML
Raw Normal View History

2022-03-15 14:32:56 +01:00
---
kind: 'pipeline'
name: 'build'
type: 'kubernetes'
2022-03-15 14:32:56 +01:00
steps:
2022-10-07 14:04:18 +02:00
# build and publish
2022-10-07 14:04:47 +02:00
- image: 'docker.io/library/docker'
name: 'publish'
2022-10-07 14:04:18 +02:00
pull: 'always'
privileged: true
2022-10-07 12:53:51 +02:00
2022-10-07 14:04:18 +02:00
environment:
IMG: 'rakepanorama/ansible-deployment-container'
DOCKER_USER:
from_secret: 'docker_username'
DOCKER_PASS:
from_secret: 'docker_password'
2022-03-15 15:44:41 +01:00
2022-10-07 14:04:18 +02:00
volumes:
2022-10-07 14:06:29 +02:00
- name: 'docker_socket'
path: '/var/run/docker.sock'
2022-10-07 14:01:55 +02:00
2022-10-07 14:04:18 +02:00
commands:
2022-10-07 14:06:29 +02:00
- 'echo building image ${IMG}'
2022-10-07 14:07:42 +02:00
- 'docker login -u ${DOCKER_USER} --password=${DOCKER_PASS} docker.io'
2022-10-07 14:06:29 +02:00
- 'docker build -t ${IMG}:v0.9 -t ${IMG}:latest -f Dockerfile.linux.amd64 .'
- 'docker push -a'
volumes:
- name: 'docker_socket'
host:
path: '/var/run/docker.sock'