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 repo: plex-dev
test: test:
image: docker image: spritsail/docker-test
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ] volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
commands: repo: plex-dev
- apk add --no-cache curl xmlstarlet grep curl: ':32400/identity'
- export CUR_VERSION="$(docker inspect -f '{{ index .Config.Labels "io.spritsail.version.plex" }}' plex-dev | cut -d- -f1)" delay: 5
- CON_NAME=$(docker run --rm -d plex-dev) retry: 10
- timeout -t 15 docker logs $$CON_NAME & pipe: |
- sleep 10 # Wait for plex to start! xmlstarlet sel -t -v "/MediaContainer/@version" |
- curl -sSL --retry-max-time 30 --max-time 5 --retry 10 --retry-delay 5 --retry-connrefused grep -qw "$(label io.spritsail.version.plex | cut -d- -f1)"
$(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: publish:
image: spritsail/docker-publish image: spritsail/docker-publish