Skip to content

Commit

Permalink
Add sonar configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ugo Plouviez committed Jun 26, 2019
1 parent c6f607f commit 506be62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ pipeline {
agent any

stages {

stage('Test') {
steps {
sh './gradlew clean test --refresh-dependencies --no-daemon'
junit 'build/test-results/test/*.xml'
withCredentials([
string(credentialsId: 'ADDRESS_SONAR', variable: 'address_sonar'),
string(credentialsId: 'SONAR_CORE_TOKEN', variable: 'core_token')]){
sh './gradlew clean test sonarqube -Dsonar.projectKey=iexec-core -Dsonar.host.url=$address_sonar -Dsonar.login=$core_token --refresh-dependencies --no-daemon'
}
junit 'build/test-results/**/*.xml'
}
}

Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ buildscript {
}
}

plugins {
id "org.sonarqube" version "2.7"
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
Expand Down

0 comments on commit 506be62

Please sign in to comment.