Hi,
I want to setup a jenkinsfile building a git project and running tests in various environments, preferably docker (multiple gcc versions, clang, ...). My approach was to simply setup agents and connect them via ssh and install docker on them. The jenkinsfile will have a parallel section listing all the environments (from differnt dockerfiles) and what commands to run in them to run the tests). The build images would be cached and reruns would be decently fast and I would probably be happy with the results.
However now I am looking at the possibility of space issues with all those docker images beeing generated. The tags for those images are currently based on the SHA1 hash of the dockerfile and as I understand it will be based on a hash out of the dockerfile and the full project name in the future. I could simply delete (docker system prune -a) images periodically, but that leaves a sour taste in my mouth due to it forcing rebuilds of actual in use containers on one hand and beeing noticable in build logs tempering with build statistics.
I know that jenkins supports build discarder properties. Can something be patched in that would extend those properties to docker images beeing build?
Or maybe someone has an idea on how I can modify my setup to not run into those issues?
BR
Lukas