Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-24011

Move SonarQube pipeline to the source code

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.1
    • Component/s: Tests
    • Tags:
    • Sprint:
      DevOps-21, DevOps-22

      Description

      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'
      }

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: