Some checks failed
gitea/abap_tutorial_11/pipeline/head There was a failure building this commit
44 lines
1.3 KiB
Groovy
44 lines
1.3 KiB
Groovy
pipeline {
|
|
agent any
|
|
|
|
tools {
|
|
nodejs 'node-latest' // Jenkins global tool name for Node.js
|
|
}
|
|
|
|
environment {
|
|
SONARQUBE_SCANNER = tool 'sonarqube' // Jenkins global tool name for SonarQube Scanner
|
|
}
|
|
|
|
stages {
|
|
stage('SonarQube Analysis') {
|
|
steps {
|
|
withSonarQubeEnv('sonarqubeserer') {
|
|
sh """
|
|
${SONARQUBE_SCANNER}/bin/sonar-scanner \\
|
|
-Dsonar.projectKey=abap-tutorial-11 \\
|
|
-Dsonar.projectName="abap-tutorial-11" \\
|
|
-Dsonar.sources=src \\
|
|
-Dsonar.tests=test,tests,__tests__ \\
|
|
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info \\
|
|
-Dsonar.exclusions=node_modules/**,coverage/**,dist/**,build/** \\
|
|
-Dsonar.testExecutionReportPaths=test-report.xml
|
|
"""
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Quality Gate') {
|
|
steps {
|
|
timeout(time: 10, unit: 'MINUTES') {
|
|
waitForQualityGate abortPipeline: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
cleanWs()
|
|
}
|
|
}
|
|
} |