update sshkey for sonarqube

This commit is contained in:
Matthieu Lamalle 2023-05-03 15:58:38 +02:00
parent 7afabcedde
commit abe8dd5f1b
1 changed files with 12 additions and 12 deletions

View File

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