The SonarQube analysis pipeline code has been validated, it is time for migrating it to the source code.
node('SLAVE') { tool name: 'maven-3', type: 'hudson.tasks.Maven$MavenInstallation' try { timeout(time: 5, unit: 'HOURS') { timestamps { stage('clone') { git 'git://github.com/nuxeo/nuxeo.git' sh 'python clone.py master' } stage('build') { withEnv(["JAVA_HOME=${tool 'java-8-oracle'}", 'MAVEN_OPTS=-Xmx6g -server']) { withCredentials([usernamePassword(credentialsId: 'c4ced779-af65-4bce-9551-4e6c0e0dcfe5', passwordVariable: 'SONARCLOUD_PWD', usernameVariable: '')]) { sh """#!/bin/bash -ex mvn clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.login=$SONARCLOUD_PWD -Dit.jacoco.destFile=$WORKSPACE/target/jacoco-it.dump -Paddons,distrib,qa,sonar """ } } } } } } catch(e) { currentBuild.result = "FAILURE" step([$class: 'ClaimPublisher']) throw e } warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java Compiler (javac)']] junit testDataPublishers: [[$class: 'ClaimTestDataPublisher'], [$class: 'AttachmentPublisher']], testResults: '**/target/failsafe-reports/*.xml, **/target/surefire-reports/*.xml' }