2020-02-13 09:31:49 +00:00
|
|
|
kind: pipeline
|
2020-02-13 17:31:37 +00:00
|
|
|
name: default
|
2020-02-13 17:07:19 +00:00
|
|
|
|
2020-02-13 17:34:10 +00:00
|
|
|
volumes:
|
|
|
|
- name: docker_socket
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
2020-02-13 09:31:49 +00:00
|
|
|
steps:
|
|
|
|
- name: build
|
2020-02-13 21:02:48 +00:00
|
|
|
image: docker
|
2020-02-13 18:45:13 +00:00
|
|
|
environment:
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_user
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
2020-02-13 17:22:43 +00:00
|
|
|
commands:
|
2020-02-13 21:03:56 +00:00
|
|
|
- mkdir /root/.docker
|
|
|
|
- mkdir /root/.docker/cli-plugins
|
2020-02-13 21:07:01 +00:00
|
|
|
- 'echo "{\"experimental\": \"enabled\"}" > /root/.docker/config.json'
|
2020-02-13 21:12:05 +00:00
|
|
|
- wget -q -O /root/.docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/v0.3.1/buildx-v0.3.1.linux-amd64
|
2020-02-13 21:03:56 +00:00
|
|
|
- chmod a+x /root/.docker/cli-plugins/docker-buildx
|
2020-02-13 18:34:59 +00:00
|
|
|
- docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
|
2020-02-13 18:39:05 +00:00
|
|
|
- docker buildx create --use --name crosscomp
|
2020-02-13 18:34:59 +00:00
|
|
|
- docker buildx inspect --bootstrap
|
2020-02-13 20:56:09 +00:00
|
|
|
- docker login --username $DOCKER_USER --password $DOCKER_PASSWORD registry.chrz.de:443
|
2020-02-13 21:10:15 +00:00
|
|
|
- docker buildx build --output=type=image,push=true --progress tty -t registry.chrz.de:443/hello-ci:latest-dev .
|
2020-02-13 17:26:01 +00:00
|
|
|
volumes:
|
|
|
|
- name: docker_socket
|
|
|
|
path: /var/run/docker.sock
|
2020-02-13 09:31:49 +00:00
|
|
|
- name: notify
|
|
|
|
image: drillster/drone-email
|
2020-02-13 09:35:25 +00:00
|
|
|
settings:
|
2020-02-13 10:01:45 +00:00
|
|
|
host: smtp
|
|
|
|
port: 25
|
|
|
|
skip_verify: true
|
2020-02-13 09:58:50 +00:00
|
|
|
from: drone@chrz.de
|
2020-02-13 09:31:49 +00:00
|
|
|
when:
|
|
|
|
status: [ success, failure ]
|