jenkinsci / jenkinsci/docker-workflow-plugin
[JENKINS-55776] export image information to build steps
- Dominant language
- Java
- Stars
- 527
- Forks
- 422
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
Due to Jenkins not doing it's own docker image garbage collection I would like to implement my own garbage collection based on which images are actually current and which are stale rather than the more naïve implementation in docker-gc of just removing the oldest images without regard to whether they are actually still currently being used by Pipeline jobs or not.
To do so, I need to keep an accounting of which images are being used by which jobs. This would need to be done in the step, or post of a Pipeline job and as such it would be useful if some kind of identifier of the image (image ID, tag, etc.) were exported to the job step and/or post.
---
Originally reported by brianjmurrell, imported from: export image information to build steps
Raw content of original issue
Due to Jenkins not doing it's own docker image garbage collection I would like to implement my own garbage collection based on which images are actually current and which are stale rather than the more naïve implementation in docker-gc of just removing the oldest images without regard to whether they are actually still currently being used by Pipeline jobs or not.
To do so, I need to keep an accounting of which images are being used by which jobs. This would need to be done in the step, or post of a Pipeline job and as such it would be useful if some kind of identifier of the image (image ID, tag, etc.) were exported to the job step and/or post.
Contributor guide
Assessment
This issue has not been assessed yet.