Files
abap_tutorial_11/Jenkinsfile
Dongho Kim 9314c462c8
Some checks failed
gitea/abap_tutorial_11/pipeline/head There was a failure building this commit
nodejs-latest to node-latest
2025-04-26 13:33:15 +02:00

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()
}
}
}