Hi,
I'm building a plugin that listens for job deletions and notifies the Sonarqube Server about that.
Background: I use feature branches with complete sonarqube scans. Jenkins creates a new job for every branch and the sonarscanner does the same on sonarqube. If a branch gets deleted, jenkins deletes the corresponding job, but the sonarqube jobs stay resulting in 100 and more orphaned jobs on sonarqube. I would like to have the sonar projects deleted, too.
So I started coding an plugin which listens for job deletions and then sends requests to sonarqube web api.
So far so good, now I need to make my plugin configurable as there may also be projects that do not use sonarqube scanning.
I would like to "simply" add an entry to the per project configuration page where i can enable my pluign. I'm having trouble finding a way to do that with multibranch pipeline, i just managed to do that with an "Freestyle project" by implementing a custom builder.
Can anyone give me a hint or help me to get this done! Or should I do that otherwise?
I would really appreciate your help a lot!
Thanks in advance,
David