Context:
- At my work most developers are free to write their own Jenkinsfile for their own team's projects.
- As the Jenkins admin, I provide developers with a global shared library.
- Most projects are using either v1 or v2 or v3 or another version of this library, using the idiom
library("theSharedLib@v#")
.
Question: Is there a way for me to find out which Jenkinsfile is using which version of the shared library without having to actually lookup into all those Jenkinsfile files (50+ files in as much git repos)?
What I would see best is some mechanism that write up (into a file on the Jenkins master or in a DB) which project/Jenkinsfile is using which version at the time the library is loaded.
A possible solution would be to add some code to every function inside the library that will actually do this reporting. I could then see which function is used by who. Any better solution?