A plugin for Drone CI to start and test build docker images
latest
- (Dockerfile)
An example configuration of how the plugin should be configured:
pipeline:
test:
image: spritsail/docker-test
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
repo: test-me:latest
retry: 5
curl: ':8080/healthcheck'
pipe: grep -qw 'online'
exec_post: |
grep -q 'teststring' /var/thing/file; another-command
To start a container and run a command inside it, then exit:
pipeline:
test:
image: spritsail/docker-test
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
repo: test-me:latest
run: my-program --version
repo
tag for the image to run and test requireddelay
startup delay for the container before executing any actionsrun
run a command in a test container and exit optionalcurl
url path to curl e.g.:8080/directory
optionalcurl_opts
additional options to pass to curl optionalretry
curl retry count before giving upretry_delay
curl delay before retryingpipe
shell code to execute on curl output. useful for ensuring output correctnessexec_pre
shell commands inside the container to run before curl optionalexec_post
shell commands inside the container to run after curl optionalrun_args
arguments to pass todocker create
optionalrun_cmd
override docker container CMD optionalverbose
print curl output and running commands. defaultfalse