Skip to content
Snippets Groups Projects

Update sonar in Jenkins to split build into sonar scan and no scan build

Merged Martin Lowe requested to merge (removed):malowe/main/sonar-ci-fix into main
2 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
127 130 withCredentials([string(credentialsId: 'sonarcloud-token-git-eca-rest-api', variable: 'SONAR_TOKEN')]) {
128 131 sh 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.login=${SONAR_TOKEN} -Dmaven.test.skip=true'
  • Martin Lowe added 1 commit

    added 1 commit

    • 62238cb7 - Update sonar scan in Jenkins to clean and verify to fix build

    Compare with previous version

  • Martin Lowe added 1 commit

    added 1 commit

    • 09946d7f - Fix missing properties that are breaking the API build

    Compare with previous version

  • Frederic Gurr
  • 120 120 stages {
    121 stage('Build Java code') {
    121 stage('Build with Sonarcloud scan') {
    122 when {
    123 branch 'main'
    124 }
    122 125 steps {
    123 126 container('buildcontainer') {
    124 127 readTrusted 'Makefile'
    125 128 readTrusted 'pom.xml'
    126 129 sh 'make generate-spec'
    127 130 withCredentials([string(credentialsId: 'sonarcloud-token-git-eca-rest-api', variable: 'SONAR_TOKEN')]) {
    128 sh 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.login=${SONAR_TOKEN} -Dmaven.test.skip=true'
    131 sh 'mvn clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -B -Dsonar.login=${SONAR_TOKEN}'
    129 132 }
    130 stash name: "target", includes: "target/**/*"
  • Martin Lowe added 1 commit

    added 1 commit

    • 046fbace - Update docker build in CI to only run on prod and staging branches

    Compare with previous version

  • Frederic Gurr approved this merge request

    approved this merge request

  • Martin Lowe mentioned in commit d14a9b2b

    mentioned in commit d14a9b2b

  • merged

  • Please register or sign in to reply
    Loading