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 {
|
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'
|
||||||
|
|||||||
Reference in New Issue
Block a user