How would you integrate Jenkins with an external tool like SonarQube for code quality analysis? Can you share a pipeline script or configuration example that includes a SonarQube stage?
Here, the question aims to explore how you can enhance Jenkins pipelines by adding a stage for code quality analysis using SonarQube. This integration checks for code issues, vulnerabilities, and compliance with standards. The response should demonstrate how to add a SonarQube stage to a Jenkins pipeline script or configuration file, including authentication and result processing.