Add build option for configuring maven central mirror
This commit is contained in:
parent
de5f8a051b
commit
20aff9b597
|
@ -110,7 +110,7 @@ stage('Build') {
|
||||||
// Use withEnv instead of setting env directly, as that is global!
|
// Use withEnv instead of setting env directly, as that is global!
|
||||||
// See https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md
|
// See https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md
|
||||||
withEnv(["JAVA_HOME=${javaHome}", "PATH+JAVA=${javaHome}/bin"]) {
|
withEnv(["JAVA_HOME=${javaHome}", "PATH+JAVA=${javaHome}/bin"]) {
|
||||||
state[buildEnv.tag]['additionalOptions'] = ''
|
state[buildEnv.tag]['additionalOptions'] = '-PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com'
|
||||||
if ( testJavaHome ) {
|
if ( testJavaHome ) {
|
||||||
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
|
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
|
||||||
" -Ptest.jdk.version=${buildEnv.testJdkVersion} -Porg.gradle.java.installations.paths=${javaHome},${testJavaHome}"
|
" -Ptest.jdk.version=${buildEnv.testJdkVersion} -Porg.gradle.java.installations.paths=${javaHome},${testJavaHome}"
|
||||||
|
|
|
@ -47,7 +47,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
dir('hibernate') {
|
dir('hibernate') {
|
||||||
checkout scm
|
checkout scm
|
||||||
sh './gradlew publishToMavenLocal -DjakartaJpaVersion=3.1.0'
|
sh './gradlew publishToMavenLocal -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com -DjakartaJpaVersion=3.1.0'
|
||||||
script {
|
script {
|
||||||
env.HIBERNATE_VERSION = sh (
|
env.HIBERNATE_VERSION = sh (
|
||||||
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2",
|
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2",
|
||||||
|
|
|
@ -41,7 +41,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
dir('hibernate') {
|
dir('hibernate') {
|
||||||
checkout scm
|
checkout scm
|
||||||
sh './gradlew publishToMavenLocal -DjakartaJpaVersion=3.2.0-SNAPSHOT'
|
sh './gradlew publishToMavenLocal -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com -DjakartaJpaVersion=3.2.0-SNAPSHOT'
|
||||||
script {
|
script {
|
||||||
env.HIBERNATE_VERSION = sh (
|
env.HIBERNATE_VERSION = sh (
|
||||||
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2",
|
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2",
|
||||||
|
|
|
@ -25,6 +25,9 @@ plugins {
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
repositories {
|
repositories {
|
||||||
|
if ( rootProject.hasProperty( "mavenMirror" ) ) {
|
||||||
|
url( rootProject.property( "mavenMirror" ) )
|
||||||
|
}
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
// Needed for the RC versions of Jakarta Persistence
|
// Needed for the RC versions of Jakarta Persistence
|
||||||
maven {
|
maven {
|
||||||
|
|
Loading…
Reference in New Issue