added sonar to pipeline

This commit is contained in:
2025-07-04 10:09:06 +02:00
parent ba4d810164
commit 5f996e7007

21
Jenkinsfile vendored
View File

@@ -1,4 +1,7 @@
def didRun = false /* groovylint-disable-next-line UnusedVariable */
@Library('InnoHub-Library') _
Boolean didRun = false
pipeline { pipeline {
agent any agent any
@@ -28,6 +31,14 @@ pipeline {
} }
stages { stages {
stage('Validate Repository') {
steps {
script {
checkRepoName(params.REPO_NAME, true)
}
}
}
stage('Install Dependencies') { stage('Install Dependencies') {
steps { steps {
script { script {
@@ -47,6 +58,14 @@ pipeline {
} }
} }
stage('SonarQube Analysis') {
steps {
withSonarQubeEnv('sonarqube') {
sh 'sonar-scanner -Dsonar.projectKey=tatort -Dsonar.sources=src'
}
}
}
stage('Push image to gitea registry') { stage('Push image to gitea registry') {
when { when {
branch 'development' branch 'development'