added sonar to pipeline
This commit is contained in:
21
Jenkinsfile
vendored
21
Jenkinsfile
vendored
@@ -1,4 +1,7 @@
|
||||
def didRun = false
|
||||
/* groovylint-disable-next-line UnusedVariable */
|
||||
@Library('InnoHub-Library') _
|
||||
|
||||
Boolean didRun = false
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
@@ -28,6 +31,14 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Validate Repository') {
|
||||
steps {
|
||||
script {
|
||||
checkRepoName(params.REPO_NAME, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Install Dependencies') {
|
||||
steps {
|
||||
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') {
|
||||
when {
|
||||
branch 'development'
|
||||
|
||||
Reference in New Issue
Block a user