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
Adam Dodman 73b6f06e37
Merge upgrades from master into pass branch
commit 8a4ed82279
Author: Adam Dodman <adam@adam-ant.co.uk>
Date:   Sun Jul 8 15:04:02 2018 +0100

    Move to mutli-stage build

commit 916ae6f3b7
Author: Adam Dodman <adam@adam-ant.co.uk>
Date:   Sun Jul 8 14:30:52 2018 +0100

    Move to commit to upgrade system

commit 316c9be5f4
Author: Adam Dodman <adam@adam-ant.co.uk>
Date:   Sun Jul 8 14:29:12 2018 +0100

    Use libressl base image

commit 13ef35e687
Author: Adam Dodman <adam@adam-ant.co.uk>
Date:   Mon Jun 11 17:10:36 2018 +0100

    Move to new notify step
2018-07-08 16:57:17 +01:00

44 lines
1.5 KiB
YAML

pipeline:
build:
image: spritsail/docker-build
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
repo: ppass-dev
tag:
image: docker
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
commands:
- docker inspect -f '{{ index .Config.Labels "io.spritsail.version.plex" }}' ppass-dev | cut -d- -f1 > .plex_tag
test:
image: docker
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
commands:
- apk add --no-cache curl xmlstarlet grep
- export CUR_VERSION="$(cat .plex_tag)"
- CON_NAME=$(docker run --rm -d ppass-dev)
- timeout -t 15 docker logs $$CON_NAME &
- sleep 10 # Wait for plex to start!
- curl -sSL --retry-max-time 30 --max-time 5 --retry 10 --retry-delay 5 --retry-connrefused
$(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
- docker kill $$CON_NAME
publish:
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 ] }
from: ppass-dev
repo: spritsail/plex-media-server
tags:
- 'plexpass'
- '%fileauto: %prefix: plexpass% .plex_tag'
notify:
image: spritsail/notify
when: { status: [ success, failure ] }
secrets: [ webhook_url, notify_token ]