2
0
mirror of https://github.com/spritsail/plex-media-server.git synced 2024-11-05 01:16:23 +00:00
plex-media-server/.drone.yml

38 lines
1.4 KiB
YAML
Raw Normal View History

2017-06-29 21:42:35 +00:00
pipeline:
build:
2018-03-16 15:26:23 +00:00
image: spritsail/docker-build
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
2018-03-17 09:21:49 +00:00
repo: ppass-dev
2017-06-29 21:42:35 +00:00
test:
image: docker
2018-03-16 15:26:23 +00:00
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
2017-06-29 21:42:35 +00:00
commands:
2017-07-09 21:37:07 +00:00
- apk add --no-cache curl xmlstarlet grep
- export CUR_VERSION="$(docker inspect -f '{{ index .Config.Labels "io.spritsail.version.plex" }}' ppass-dev | cut -d- -f1)"
2017-09-19 22:42:50 +00:00
- CON_NAME=$(docker run --rm -d ppass-dev)
2017-12-15 16:48:29 +00:00
- timeout -t 15 docker logs $$CON_NAME &
2017-06-30 15:39:55 +00:00
- sleep 10 # Wait for plex to start!
- curl -sSL --retry-max-time 30 --max-time 5 --retry 10 --retry-delay 5 --retry-connrefused
2018-03-16 15:26:23 +00:00
$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $$CON_NAME):32400/identity
| tee /dev/stderr
| xmlstarlet sel -t -v "/MediaContainer/@version"
| grep -qw $CUR_VERSION
2017-12-15 16:48:29 +00:00
- docker kill $$CON_NAME
2017-06-30 15:39:55 +00:00
publish:
2018-03-16 15:26:23 +00:00
image: spritsail/docker-publish
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
secrets: [ docker_username, docker_password, microbadger_token ]
when: { branch: [ master, pass ], event: [ push, tag, deployment ] }
2018-03-17 09:21:49 +00:00
from: ppass-dev
2018-03-16 15:26:23 +00:00
repo: spritsail/plex-media-server
tags:
2018-03-17 09:21:49 +00:00
- 'plexpass'
- '%labelauto: %prefix: plexpass% io.spritsail.version.plex'
2018-03-16 15:26:23 +00:00
notify:
2018-06-11 16:10:36 +00:00
image: spritsail/notify
2018-03-16 15:26:23 +00:00
when: { status: [ success, failure ] }
2018-06-11 16:10:36 +00:00
secrets: [ webhook_url, notify_token ]