Skip to content
Snippets Groups Projects

feat: Add SonarCloud bindings

1 unresolved thread
2 files
+ 36
1
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 32
1
@@ -48,6 +48,9 @@ pipeline {
- mountPath: "/home/jenkins/.cache"
name: "yarn-cache"
readOnly: false
- mountPath: "/home/jenkins/.sonar"
name: "sonar-cache"
readOnly: false
- name: jnlp
resources:
requests:
@@ -69,6 +72,8 @@ pipeline {
emptyDir: {}
- name: yarn-cache
emptyDir: {}
- name: sonar-cache
emptyDir: {}
'''
}
}
@@ -103,7 +108,33 @@ pipeline {
}
stages {
stage('Build project') {
stage('Build with Sonarcloud scan') {
when {
branch 'main'
}
steps {
container('buildcontainer') {
readTrusted 'Makefile'
readTrusted 'pom.xml'
readTrusted 'package.json'
sh 'make compile-test-resources'
withCredentials([string(credentialsId: 'sonarcloud-token-eclipse-openvsx-api', variable: 'SONAR_TOKEN')]) {
sh 'mvn clean verify -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.token=${SONAR_TOKEN}'
}
stash name: "target", includes: "target/**/*"
}
}
}
stage('Build without Sonarcloud scan') {
when {
not {
branch 'main'
}
}
steps {
container('buildcontainer') {
readTrusted 'Makefile'
Loading