diff --git a/vars/sonarqube.groovy b/vars/sonarqube.groovy index 53652b1..4dceef7 100644 --- a/vars/sonarqube.groovy +++ b/vars/sonarqube.groovy @@ -4,9 +4,9 @@ def call() { agent { label 'docker' } - + environment { - projectDir = "${env.project_name}_${env.BUILD_ID}" + projectDir = "${env.project_name}_${env.BUILD_ID}" } stages { @@ -19,21 +19,21 @@ def call() { steps { script { stage("Clone repository") { - checkout scm: + checkout scm: [ - $class: 'GitSCM', - userRemoteConfigs: [[url: env.repository_url, credentialsId: 'jenkins-forge-ssh']], + $class: 'GitSCM', + userRemoteConfigs: [[url: env.repository_url, credentialsId: 'jenkins-ssh-mse']], branches: [[name: env.ref]], extensions: [ [$class: 'RelativeTargetDirectory', relativeTargetDir: env.projectDir ], [$class: 'CloneOption', noTags: false, shallow: false, depth: 0, reference: ''], [$class: 'WipeWorkspace' ] ] - ], - changelog: false, + ], + changelog: false, poll: false } - + stage("Scan project") { dir(env.projectDir) { withCredentials([ @@ -57,14 +57,14 @@ def call() { // avatar: 'https://jenkins.cadol.es/static/b5f67753/images/headshot.png', // message: """ // Le projet ${env.project_name} a été scanné par SonarQube. - + // - [Voir les résultats](${env.SONARQUBE_URL}/dashboard?id=${env.sonarqubeProjectKey}) // - [Visualiser le job](${env.RUN_DISPLAY_URL}) - + // @${env.sender_login} // """.stripIndent(), // rawMessage: true, - // ) + // ) } } } @@ -77,4 +77,4 @@ def call() { } } } -} \ No newline at end of file +}