HHH-15528 Build related fixes for Cockroach, and tryout GH actions

This commit is contained in:
Christian Beikov 2022-10-21 10:28:17 +02:00
parent 771f338961
commit 886582bf46
2 changed files with 11 additions and 3 deletions

6
Jenkinsfile vendored
View File

@ -211,7 +211,10 @@ stage('Build') {
}
}
else {
lock(buildEnv.dbLockableResource) {
lock(label: buildEnv.dbLockableResource, variable: 'LOCKED_RESOURCE') {
if ( buildEnv.dbLockResourceAsHost ) {
cmd += " -DdbHost=${LOCKED_RESOURCE}"
}
timeout( [time: buildEnv.longRunning ? 240 : 120, unit: 'MINUTES'] ) {
sh cmd
}
@ -250,6 +253,7 @@ class BuildEnvironment {
String dbName = 'h2'
String node
String dbLockableResource
boolean dbLockResourceAsHost
String additionalOptions
String notificationRecipients
boolean longRunning

View File

@ -26,7 +26,7 @@ this.helper = new JobHelper(this)
helper.runWithNotification {
stage('Configure') {
this.environments = [
new BuildEnvironment( dbName: 'cockroachdb', node: 'LongDuration', longRunning: true ))
new BuildEnvironment( dbName: 'cockroachdb', node: 'cockroachdb', longRunning: true, dbLockableResource: 'cockroachdb', dbLockResourceAsHost: true )
];
helper.configure {
@ -185,7 +185,10 @@ stage('Build') {
}
}
else {
lock(buildEnv.dbLockableResource) {
lock(label: buildEnv.dbLockableResource, variable: 'LOCKED_RESOURCE') {
if ( buildEnv.dbLockResourceAsHost ) {
cmd += " -DdbHost=${LOCKED_RESOURCE}"
}
timeout( [time: buildEnv.longRunning ? 240 : 120, unit: 'MINUTES'] ) {
sh cmd
}
@ -224,6 +227,7 @@ class BuildEnvironment {
String dbName = 'h2'
String node
String dbLockableResource
boolean dbLockResourceAsHost
String additionalOptions
String notificationRecipients
boolean longRunning