ansible-deployment-container/.drone.yml

28 lines
612 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:
# build and publish
2022-10-07 14:01:55 +02:00
- name: 'publish'
image: 'docker.io/library/docker'
2022-03-15 14:32:56 +01:00
pull: 'always'
2022-10-07 12:53:51 +02:00
2022-10-07 14:01:55 +02:00
environment:
IMG: 'rakepanorama/ansible-deployment-container'
DOCKER_USER:
2022-03-15 14:32:56 +01:00
from_secret: 'docker_username'
2022-10-07 14:01:55 +02:00
DOCKER_PASS:
2022-03-15 14:37:35 +01:00
from_secret: 'docker_password'
2022-03-15 15:44:41 +01:00
2022-10-07 14:01:55 +02:00
volumes:
2022-10-07 14:02:29 +02:00
- '/var/run/docker.sock:/var/run/docker.sock'
2022-10-07 14:01:55 +02:00
commands:
2022-10-07 14:02:29 +02:00
- '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'