Use spritsail/drone-test CI step

This commit is contained in:
Joe Groocock 2018-08-06 13:29:46 +01:00
parent ce5995132c
commit 6fb006928d
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

@ -5,20 +5,15 @@ pipeline:
repo: plex-dev
test:
image: docker
image: spritsail/docker-test
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
commands:
- apk add --no-cache curl xmlstarlet grep
- export CUR_VERSION="$(docker inspect -f '{{ index .Config.Labels "io.spritsail.version.plex" }}' plex-dev | cut -d- -f1)"
- CON_NAME=$(docker run --rm -d plex-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
repo: plex-dev
curl: ':32400/identity'
delay: 5
retry: 10
pipe: |
xmlstarlet sel -t -v "/MediaContainer/@version" |
grep -qw "$(label io.spritsail.version.plex | cut -d- -f1)"
publish:
image: spritsail/docker-publish