Skip to content

Commit 5705800

Browse files
committed
Try to workaround hibernate-platform not being published to maven local
1 parent 65a26a2 commit 5705800

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

ci/jpa-3.2-tck.Jenkinsfile

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,15 @@ pipeline {
4848
}
4949
dir('hibernate') {
5050
checkout scm
51-
sh './gradlew publishToMavenLocal -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com'
51+
withEnv([
52+
"DISABLE_REMOTE_GRADLE_CACHE=true"
53+
]) {
54+
sh './gradlew clean publishToMavenLocal -x test --no-scan --no-daemon --no-build-cache --stacktrace -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com'
55+
// For some reason, Gradle does not publish hibernate-platform
56+
// to the local maven repository with the previous command,
57+
// but requires an extra run instead
58+
sh './gradlew :hibernate-platform:publishToMavenLocal -x test --no-scan --no-daemon --no-build-cache --stacktrace -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com'
59+
}
5260
script {
5361
env.HIBERNATE_VERSION = sh (
5462
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2",
@@ -116,15 +124,15 @@ pipeline {
116124
else {
117125
containerName = params.RDBMS
118126
}
119-
def dockerRunOptions = "--network=tck-net -e DB_HOST=${containerName}"
120-
sh """ \
121-
while IFS= read -r container; do
122-
docker network disconnect tck-net \$container || true
123-
done <<< \$(docker network inspect tck-net --format '{{range \$k, \$v := .Containers}}{{print \$k}}{{end}}' 2>/dev/null || true)
124-
docker network rm -f tck-net
125-
docker network create tck-net
126-
docker network connect tck-net ${containerName}
127-
"""
127+
def dockerRunOptions = "--network=tck-net -e DB_HOST=${containerName} -u ${UID}:${GID}"
128+
sh """ \
129+
while IFS= read -r container; do
130+
docker network disconnect tck-net \$container || true
131+
done <<< \$(docker network inspect tck-net --format '{{range \$k, \$v := .Containers}}{{print \$k}}{{end}}' 2>/dev/null || true)
132+
docker network rm -f tck-net
133+
docker network create tck-net
134+
docker network connect tck-net ${containerName}
135+
"""
128136
sh """ \
129137
rm -Rf ./results
130138
docker rm -f tck || true

ci/snapshot-publish.Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pipeline {
4242
withEnv([
4343
"DISABLE_REMOTE_GRADLE_CACHE=true"
4444
]) {
45-
sh './gradlew clean publish -x test --no-scan --no-daemon --no-build-cache --stacktrace'
45+
sh './gradlew clean publish -x test --no-scan --no-daemon --no-build-cache --stacktrace -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com'
4646
}
4747
}
4848
}

0 commit comments

Comments
 (0)