How to use docker as an CI toolkit
docker be used as CI? You serious?
Since hub.docker.com offers many barebone distributions and containers are so fast to build and remove. That made the sense!
The better part of docker is that there would be tons of PaaS and image building is isolated from PaaS serving containers.
What’s your solution?
1. Build image with RUN /path/to/script.sh on the specified distribution.
If any script exit with non-zero, docker daemon would catch it and abort the build process.
We can assert script is able to run under specified distribution.
%%MORE%%
2. Run fresh built images in container
If the log turns out to be sane, then it’s a duck.
If no luck in logs, go bumming your scripts, you get an BAD from docker CI.
Reference
CI experiment on hyper-installer BASH script
Run command in stopped container