Add Develocity build scan + build cache to Jenkins build
This commit is contained in:
parent
65911ae995
commit
96fc18f4e8
|
@ -155,29 +155,35 @@ stage('Build') {
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
String cmd = "./ci/build.sh ${buildEnv.additionalOptions ?: ''} ${state[buildEnv.tag]['additionalOptions'] ?: ''}"
|
String cmd = "./ci/build.sh ${buildEnv.additionalOptions ?: ''} ${state[buildEnv.tag]['additionalOptions'] ?: ''}"
|
||||||
withEnv(["RDBMS=${buildEnv.dbName}"]) {
|
withEnv(["RDBMS=${buildEnv.dbName}"]) {
|
||||||
try {
|
withCredentials([string(credentialsId: helper.scmSource.pullRequest ?
|
||||||
if (buildEnv.dbLockableResource == null) {
|
'ge.hibernate.org-access-key-pr' : 'ge.hibernate.org-access-key',
|
||||||
withCredentials([file(credentialsId: 'sybase-jconnect-driver', variable: 'jconnect_driver')]) {
|
variable: 'GRADLE_ENTERPRISE_ACCESS_KEY')]) {
|
||||||
sh 'cp -f $jconnect_driver ./drivers/jconn4.jar'
|
withGradle { // withDevelocity, actually: https://plugins.jenkins.io/gradle/#plugin-content-capturing-build-scans-from-jenkins-pipeline
|
||||||
timeout( [time: buildEnv.longRunning ? 480 : 120, unit: 'MINUTES'] ) {
|
try {
|
||||||
sh cmd
|
if (buildEnv.dbLockableResource == null) {
|
||||||
|
withCredentials([file(credentialsId: 'sybase-jconnect-driver', variable: 'jconnect_driver')]) {
|
||||||
|
sh 'cp -f $jconnect_driver ./drivers/jconn4.jar'
|
||||||
|
timeout( [time: buildEnv.longRunning ? 480 : 120, unit: 'MINUTES'] ) {
|
||||||
|
sh cmd
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
lock(label: buildEnv.dbLockableResource, quantity: 1, variable: 'LOCKED_RESOURCE') {
|
||||||
|
if ( buildEnv.dbLockResourceAsHost ) {
|
||||||
|
cmd += " -DdbHost=${LOCKED_RESOURCE}"
|
||||||
|
}
|
||||||
|
timeout( [time: buildEnv.longRunning ? 480 : 120, unit: 'MINUTES'] ) {
|
||||||
|
sh cmd
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
finally {
|
||||||
else {
|
junit '**/target/test-results/test/*.xml,**/target/test-results/testKitTest/*.xml'
|
||||||
lock(label: buildEnv.dbLockableResource, quantity: 1, variable: 'LOCKED_RESOURCE') {
|
|
||||||
if ( buildEnv.dbLockResourceAsHost ) {
|
|
||||||
cmd += " -DdbHost=${LOCKED_RESOURCE}"
|
|
||||||
}
|
|
||||||
timeout( [time: buildEnv.longRunning ? 480 : 120, unit: 'MINUTES'] ) {
|
|
||||||
sh cmd
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally {
|
|
||||||
junit '**/target/test-results/test/*.xml,**/target/test-results/testKitTest/*.xml'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue