Search code examples
jenkinssonarqubesonarqube-web

How to use a script shell or a jenkins plugin to create or to delete a sonarqube project?


I have many project of Sonarqube, each project correspond to a a version of my software.

At the same moment, I save the last 5 version of my software. I use jenkins for integration continue.

My aims it to delete or to create a sonarqube project by a script or a jenkins plugins

Thank you


Solution

  • Projects are created on their first analysis. If you need to create them before that, you can Provision them via the UI or via web services, which will also let you delete projects: https://sonarqube.com/web_api/api/projects

    So your script simply needs to invoke the web services with the proper permissions.