SonarQube Scans in Jenkins Declarative Pipeline using SonarScanner Setup a SonarQube scan using Jenkins declarative pipelines. Find out how to use the withSonarQubeEnv method and configure a quality gate using waitForQualityGate.