JK
This commit is contained in:
parent
7d60224421
commit
1e13301dad
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -12,8 +12,6 @@ pipeline {
|
||||
parameters {
|
||||
string(name: 'GIT_URL', defaultValue: 'file:///repos/AS400API.git', description: 'Git repository URL to clone')
|
||||
string(name: 'GIT_BRANCH', defaultValue: 'main', description: 'Branch or ref to build')
|
||||
string(name: 'SONARQUBE_SERVER', defaultValue: 'SonarQube', description: 'Name of the SonarQube server configured in Jenkins (Manage Jenkins → Configure System)')
|
||||
string(name: 'SONAR_TOKEN_ID', defaultValue: '', description: 'Jenkins Secret Text credential ID for the Sonar token')
|
||||
// string(name: 'AGENT_LABEL', defaultValue: '', description: 'Optional Jenkins agent label with Docker CLI access (leave blank for default node)')
|
||||
}
|
||||
|
||||
@ -155,7 +153,7 @@ pipeline {
|
||||
script {
|
||||
env.SONAR_PROJECT_VERSION = env.BUILD_NUMBER ?: '0.0.0'
|
||||
}
|
||||
withSonarQubeEnv('sonarqube') {
|
||||
withSonarQubeEnv('SonarQube') {
|
||||
sh '''#!/bin/bash -e
|
||||
dotnet sonarscanner begin \
|
||||
/k:"${SONAR_PROJECT_KEY}" \
|
||||
@ -181,7 +179,7 @@ pipeline {
|
||||
stage('SonarQube: End') {
|
||||
steps {
|
||||
// Close the Sonar analysis and push data to the server.
|
||||
withSonarQubeEnv('sonarqube') {
|
||||
withSonarQubeEnv('SonarQube') {
|
||||
sh '''#!/bin/bash -e
|
||||
dotnet sonarscanner end /d:sonar.login="${SONAR_AUTH_TOKEN}"
|
||||
'''
|
||||
|
||||
Loading…
Reference in New Issue
Block a user