39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
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:
|
|
- apk add --no-cache curl
|
|
- 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
|
|
|
|
publish:
|
|
image: docker
|
|
secrets: [ DOCKER_USER, DOCKER_PASS ]
|
|
environment:
|
|
- DOCKER_HOST=tcp://docker:2375
|
|
commands:
|
|
- 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
|
|
- docker login -u $DOCKER_USER -p $DOCKER_PASS
|
|
- docker tag devbuild adamant/plexmediaserver:CI_TEST_BUILD
|
|
- docker push adamant/plexmediaserver:CI_TEST_BUILD
|