Add Develocity build scan + build cache to Jenkins build

This commit is contained in:
Yoann Rodière 2024-03-21 15:09:46 +01:00 committed by Steve Ebersole
parent c14c608199
commit 720c726959
1 changed files with 24 additions and 18 deletions

6
Jenkinsfile vendored
View File

@ -155,6 +155,10 @@ stage('Build') {
stage('Test') {
String cmd = "./ci/build.sh ${buildEnv.additionalOptions ?: ''} ${state[buildEnv.tag]['additionalOptions'] ?: ''}"
withEnv(["RDBMS=${buildEnv.dbName}"]) {
withCredentials([string(credentialsId: helper.scmSource.pullRequest ?
'ge.hibernate.org-access-key-pr' : 'ge.hibernate.org-access-key',
variable: 'GRADLE_ENTERPRISE_ACCESS_KEY')]) {
withGradle { // withDevelocity, actually: https://plugins.jenkins.io/gradle/#plugin-content-capturing-build-scans-from-jenkins-pipeline
try {
if (buildEnv.dbLockableResource == null) {
withCredentials([file(credentialsId: 'sybase-jconnect-driver', variable: 'jconnect_driver')]) {
@ -181,6 +185,8 @@ stage('Build') {
}
}
}
}
}
finally {
if ( state[buildEnv.tag]['containerName'] != null ) {
sh "docker rm -f ${state[buildEnv.tag]['containerName']}"