From 1e6d6b820728c9df80618f02ba1a1834b7141cb7 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Fri, 21 Oct 2022 16:06:45 +0200 Subject: [PATCH] Switch to HANA cloud instances --- Jenkinsfile | 10 ++++++---- ci/build.sh | 4 ++-- gradle/databases.gradle | 2 +- nightly.Jenkinsfile | 12 ++++-------- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 87727805a1..8feb7dd4f2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,13 +39,12 @@ stage('Configure') { // new BuildEnvironment( dbName: 'db2' ), // new BuildEnvironment( dbName: 'mssql' ), // new BuildEnvironment( dbName: 'sybase' ), - new BuildEnvironment( dbName: 'hana_jenkins', node: 'HANA' ), +// Don't build with HANA by default, but only do it nightly until we receive a 3rd instance +// new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ), new BuildEnvironment( node: 's390x' ), new BuildEnvironment( dbName: 'tidb', node: 'tidb', additionalOptions: '-DdbHost=localhost:4000', notificationRecipients: 'tidb_hibernate@pingcap.com' ), -// Disable EDB for now as the image is not available anymore -// new BuildEnvironment( dbName: 'edb', additionalOptions: '-DdbHost=localhost:5433' ), new BuildEnvironment( testJdkVersion: '17' ), new BuildEnvironment( testJdkVersion: '18' ), // We want to enable preview features when testing early-access builds of OpenJDK: @@ -59,6 +58,9 @@ stage('Configure') { if ( pullRequest.labels.contains( 'cockroachdb' ) ) { this.environments.add( new BuildEnvironment( dbName: 'cockroachdb', node: 'LongDuration', longRunning: true ) ) } + if ( pullRequest.labels.contains( 'hana' ) ) { + this.environments.add( new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ) ) + } } helper.configure { @@ -211,7 +213,7 @@ stage('Build') { } } else { - lock(label: buildEnv.dbLockableResource, variable: 'LOCKED_RESOURCE') { + lock(label: buildEnv.dbLockableResource, quantity: 1, variable: 'LOCKED_RESOURCE') { if ( buildEnv.dbLockResourceAsHost ) { cmd += " -DdbHost=${LOCKED_RESOURCE}" } diff --git a/ci/build.sh b/ci/build.sh index 72a9fa3dfb..54ebf564bb 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -32,8 +32,8 @@ elif [ "$RDBMS" == "mssql" ]; then goal="-Pdb=mssql_ci" elif [ "$RDBMS" == "hana" ]; then goal="-Pdb=hana_ci" -elif [ "$RDBMS" == "hana_jenkins" ]; then - goal="-Pdb=hana_jenkins" +elif [ "$RDBMS" == "hana_cloud" ]; then + goal="-Pdb=hana_cloud" elif [ "$RDBMS" == "sybase" ]; then goal="-Pdb=sybase_ci" elif [ "$RDBMS" == "tidb" ]; then diff --git a/gradle/databases.gradle b/gradle/databases.gradle index d2a41e72ce..53322991ff 100644 --- a/gradle/databases.gradle +++ b/gradle/databases.gradle @@ -271,7 +271,7 @@ ext { 'connection.init_sql' : '' ], hana_cloud : [ - 'db.dialect' : 'org.hibernate.dialect.HANACloudColumnStoreDialect', + 'db.dialect' : 'org.hibernate.dialect.HANAColumnStoreDialect', 'jdbc.driver': 'com.sap.db.jdbc.Driver', 'jdbc.user' : 'HIBERNATE_TEST', 'jdbc.pass' : 'H1bernate_test', diff --git a/nightly.Jenkinsfile b/nightly.Jenkinsfile index 2537c04100..70b96ce64e 100644 --- a/nightly.Jenkinsfile +++ b/nightly.Jenkinsfile @@ -26,7 +26,8 @@ this.helper = new JobHelper(this) helper.runWithNotification { stage('Configure') { this.environments = [ - new BuildEnvironment( dbName: 'cockroachdb', node: 'cockroachdb', longRunning: true ) + new BuildEnvironment( dbName: 'cockroachdb', node: 'cockroachdb', longRunning: true ), + new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ) ]; helper.configure { @@ -164,12 +165,7 @@ stage('Build') { state[buildEnv.tag]['containerName'] = "sybase" break; case "edb": - docker.withRegistry('https://containers.enterprisedb.com', 'hibernateci.containers.enterprisedb.com') { - // withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'hibernateci.containers.enterprisedb.com', - // usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) { - // sh 'docker login -u "$USERNAME" -p "$PASSWORD" https://containers.enterprisedb.com' - docker.image('containers.enterprisedb.com/edb/edb-as-lite:v11').pull() - } + docker.image('quay.io/enterprisedb/edb-postgres-advanced:10.22').pull() sh "./docker_db.sh edb" state[buildEnv.tag]['containerName'] = "edb" break; @@ -185,7 +181,7 @@ stage('Build') { } } else { - lock(label: buildEnv.dbLockableResource, variable: 'LOCKED_RESOURCE') { + lock(label: buildEnv.dbLockableResource, quantity: 1, variable: 'LOCKED_RESOURCE') { if ( buildEnv.dbLockResourceAsHost ) { cmd += " -DdbHost=${LOCKED_RESOURCE}" }