busybox/.drone.yml

46 lines
1.3 KiB
YAML
Raw Normal View History

2017-06-30 21:59:26 +00:00
services:
docker:
image: docker:dind
privileged: true
pipeline:
build:
image: docker
environment:
2017-08-09 13:23:28 +00:00
- DOCKER_HOST=tcp://docker:2375
2017-06-30 21:59:26 +00:00
commands:
2017-08-09 13:23:28 +00:00
- docker build -t devbuild .
2017-06-30 21:59:26 +00:00
test:
image: docker
environment:
2017-08-09 13:23:28 +00:00
- DOCKER_HOST=tcp://docker:2375
2017-06-30 21:59:26 +00:00
commands:
2017-08-09 13:21:41 +00:00
- docker run --rm devbuild /bin/sh -xec 'true'
- docker run --rm devbuild /bin/sh -xec 'test -f /lib/libc-*.so'
- docker run --rm devbuild /bin/sh -xec 'nslookup google.com'
- test "$(docker run --rm devbuild /bin/sh -xec 'date +%Z')" = 'UTC'
- test "$(docker run --rm devbuild /bin/sh -xec 'echo This is a test string | md5sum | cut -f1 -d\ ' | tee /dev/stderr)" = 'b584c39f97dfe71ebceea3fdb860ed6c'
2017-06-30 21:59:26 +00:00
publish:
image: docker
secrets: [ DOCKER_USER, DOCKER_PASS ]
environment:
2017-08-09 13:23:28 +00:00
- DOCKER_HOST=tcp://docker:2375
2017-06-30 21:59:26 +00:00
commands:
2017-08-09 13:23:28 +00:00
- docker login -u $DOCKER_USER -p $DOCKER_PASS
2017-08-09 16:52:38 +00:00
- docker tag devbuild adamant/busybox:latest
- docker tag devbuild adamant/busybox:1.1
- docker push adamant/busybox
downstream:
image: plugins/downstream
secrets: [ DOWNSTREAM_TOKEN ]
server: https://drone.adam-ant.co.uk
fork: true
repositories:
- Adam-Ant/docker-busybox-base@libressl
when:
event: [ push, tag, deployment]
status: [ success ]