-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins_sonarqube
30 lines (29 loc) · 925 Bytes
/
jenkins_sonarqube
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
pipeline {
agent any
stages {
stage('checkout code'){
steps {
checkout([$class: 'GitSCM',
branches: [[name: '*/code-analysis-sonar']],
extensions: scm.extensions,
userRemoteConfigs: [[
url: '[email protected]:squapllabs/omni-flux.git',
credentialsId: 'GitCredentials'
]]
])
echo 'git checkout completed'
}
}
stage('sonarqube analysis'){
steps{
nodejs(nodeJSInstallationName: 'NodeJS'){
sh "npm install"
withSonarQubeEnv('SonarQube_Server'){
sh "npm install sonar-scanner"
sh "npm run SonarQube_Server"
}
}
}
}
}
}