INFRA-381 Removing sonarqube (#6312)

This commit is contained in:
Razvan Codreanu 2020-06-04 15:06:36 +01:00 committed by GitHub
parent 04ddb267fd
commit f27240b1ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,13 @@
@Library('corda-shared-build-pipeline-steps')
import static com.r3.build.BuildControl.killAllExistingBuildsForJob
killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger())
pipeline {
agent { label 'k8s' }
options {
timestamps()
buildDiscarder(logRotator(daysToKeepStr: '7', artifactDaysToKeepStr: '7'))
disableConcurrentBuilds()
timeout(time: 3, unit: 'HOURS')
}
@ -57,36 +61,6 @@ pipeline {
" allParallelSlowIntegrationTest --stacktrace"
}
}
stage('Generate sonarqube report') {
steps {
script {
try {
// running this step here is the only way to not majorly affect the distributed test plugin,
// as now that neither returns build files nor runs jacoco reports
sh "./gradlew --no-daemon build jacocoRootReport --stacktrace"
withSonarQubeEnv('sq01') {
sh "./gradlew --no-daemon sonarqube -x test --stacktrace"
}
timeout(time: 3, unit: 'MINUTES') {
script {
try {
def qg = waitForQualityGate();
if (qg.status != 'OK') {
error "Pipeline aborted due to quality gate failure: ${qg.status}"
}
} catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) {
println('No sonarqube webhook response within timeout. Please check the webhook configuration in sonarqube.')
// continue the pipeline
}
}
}
} catch (err) {
println('Error while trying to execute sonarqube analysis, will be skipped.')
}
}
}
}
}
}
}
@ -166,4 +140,4 @@ pipeline {
deleteDir() /* clean up our workspace */
}
}
}
}