ansible-deployment-container/.drone.yml

29 lines
701 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 12:38:50 +02:00
- image: 'docker.io/library/docker:dind'
2022-03-15 14:32:56 +01:00
name: 'publish'
pull: 'always'
2022-10-07 11:51:29 +02:00
privileged: true
2022-10-07 12:53:51 +02:00
volumes:
- name: dockersock
path: /var/run
2022-10-07 12:38:50 +02:00
environment:
DOCKER_USERNAME:
2022-03-15 14:32:56 +01:00
from_secret: 'docker_username'
2022-10-07 12:38:50 +02:00
DOCKER_PASSWORD:
2022-03-15 14:37:35 +01:00
from_secret: 'docker_password'
2022-03-15 15:44:41 +01:00
2022-10-07 12:38:50 +02:00
commands:
- 'sleep 1'
2022-10-07 12:49:07 +02:00
- 'docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker.io'
2022-10-07 12:41:54 +02:00
- 'docker build --network host -t rakepanorama/ansible-deployment-container:v0.9 -t rakepanorama/ansible-deployment-container:latest -f Dockerfile.linux.amd64 .'
2022-10-07 12:38:50 +02:00
- 'docker push -a rakepanorama/ansible-deployment-container'