busybox/.drone.yml

39 lines
1.1 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:
- DOCKER_HOST=tcp://docker:2375
commands:
- docker build -t devbuild .
test:
image: docker
environment:
- DOCKER_HOST=tcp://docker:2375
commands:
2017-08-02 20:57:04 +00:00
- docker run -tt --rm devbuild /bin/busybox
- docker run -tt --rm devbuild /bin/sh -c 'test -f /lib/libc-*.so'
2017-06-30 21:59:26 +00:00
- export RESULT=$(docker run --name=DEV --rm devbuild /bin/sh -c 'echo This is a test string | md5sum | cut -f1 -d\ ' )
- echo $RESULT
- test $RESULT = 'b584c39f97dfe71ebceea3fdb860ed6c'
publish:
image: docker
secrets: [ DOCKER_USER, DOCKER_PASS ]
environment:
- DOCKER_HOST=tcp://docker:2375
commands:
- apk add --no-cache openssl
- docker tag devbuild adamant/busybox:latest
- docker tag devbuild adamant/busybox:1
- docker tag devbuild adamant/busybox:1.0
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- docker push adamant/busybox:latest
- docker push adamant/busybox:1
- docker push adamant/busybox:1.0