I’m very excited about this shared library. I actually submitted it to be used in jenkins-infra (which has been heavily upgraded and made even cooler). This version will build and publish an image every time master (configurable) is updated. When code is tagged, it’ll also upload a specific version of that tag. I use it for a lot of the docker images I use in helm charts.
As you mentioned, that shared library as been made even better with the help of @dduportal and Garet by adding few abstraction.
- Instead of calling docker command, Damien switch to a Makefile so we can run exactly the same commands locally.
- By templating docker commands, we can easily switch between docker and img, which is useful when either building images from k8s environment or virtual machine with docker installed
- Using semantic versionning for docker tag
- Using container structure test
Nice work @halkeye ! It looks like the initial work differed a bit between your library and the current one used on infra.ci (pipeline-library/buildDockerAndPublishImage.groovy at 49079e12057df69a0a73e9551ba56deac0e5e4fa · jenkins-infra/pipeline-library · GitHub) but the concept stays the same!
That is really nice to see such use cases!
Don’t hesitate to share what you learned by building this library and contribute back to the existing one if you feel it!
I’m also available to discuss and challenge any choice we made on the current one of course