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!
|
2017-06-30 16:15:13 +00:00
|
|
|
- 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
|
|
|
|
2017-06-30 16:15:13 +00:00
|
|
|
publish:
|
|
|
|
image: docker
|
|
|
|
environment:
|
|
|
|
- DOCKER_HOST=tcp://docker:2375
|
|
|
|
commands:
|
|
|
|
- docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
|
|
|
|
- docker tag devbuild adamant/plexmediaserver:CI_TEST_BUILD
|
|
|
|
- docker push adamant/plexmediaserver:CI_TEST_BUILD
|