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-commandTo 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 --versionrepotag for the image to run and test requireddelaystartup delay for the container before executing any actionsrunrun a command in a test container and exit optionalcurlurl path to curl e.g.:8080/directoryoptionalcurl_optsadditional options to pass to curl optionalretrycurl retry count before giving upretry_delaycurl delay before retryingpipeshell code to execute on curl output. useful for ensuring output correctnessexec_preshell commands inside the container to run before curl optionalexec_postshell commands inside the container to run after curl optionalrun_argsarguments to pass todocker createoptionalrun_cmdoverride docker container CMD optionalverboseprint curl output and running commands. defaultfalse