plex-test/.drone.yml

42 lines
1.3 KiB
YAML
Raw Normal View History

2017-06-30 15:39:55 +00:00
services:
docker:
image: docker:dind
privileged: true
2017-06-29 21:42:35 +00:00
pipeline:
build:
image: docker
2017-06-30 15:39:55 +00:00
environment:
- DOCKER_HOST=tcp://docker:2375
2017-06-29 21:42:35 +00:00
commands:
2017-06-30 15:39:55 +00:00
- docker build -t devbuild .
2017-06-29 21:42:35 +00:00
test:
image: docker
2017-06-30 15:39:55 +00:00
environment:
- DOCKER_HOST=tcp://docker:2375
2017-06-29 21:42:35 +00:00
commands:
2017-06-30 15:47:02 +00:00
- apk add --no-cache curl
2017-06-30 15:39:55 +00:00
- docker run --name=DEV -d -p 32400:32400 devbuild
- sleep 10 # Wait for plex to start!
- docker logs DEV
- curl docker:32400 # Check if its responding, a 401 here is expected [[TODO]] Maybe exec this from within docker, and grep for correct version?
- docker kill DEV #Not really needed, but keeps things quick
2017-06-30 15:39:55 +00:00
publish:
image: docker
2017-06-30 16:48:24 +00:00
secrets: [ DOCKER_USER, DOCKER_PASS ]
environment:
- DOCKER_HOST=tcp://docker:2375
commands:
2017-06-30 16:48:24 +00:00
- apk add --no-cache openssl
- export CUR_VERSION=$(wget -qO- https://adam-ant.co.uk/plex/version.php | cut -d \- -f1)
- echo $CUR_VERSION
- echo $DOCKER_USER
2017-06-30 17:16:40 +00:00
- docker tag devbuild adamant/plexmediaserver:latest
- docker tag devbuild adamant/plexmediaserver:$CUR_VERSION
2017-06-30 16:48:24 +00:00
- docker login -u $DOCKER_USER -p $DOCKER_PASS
2017-06-30 17:16:40 +00:00
- docker push adamant/plexmediaserver:latest
- docker push adamant/plexmediaserver:$CUR_VERSION
- echo "CONGRATS! SUCCESSFULLY BUILT PLEX VERSION "$CUR_VERSION