2022-03-15 14:32:56 +01:00
|
|
|
---
|
|
|
|
kind: 'pipeline'
|
|
|
|
name: 'build'
|
2022-10-07 11:38:52 +02:00
|
|
|
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:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2022-10-07 14:01:55 +02:00
|
|
|
|
2022-10-07 14:04:18 +02:00
|
|
|
commands:
|
|
|
|
- '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'
|