Skip to content

Commit d7a0fca

Browse files
marko-bekhtabeikov
andcommitted
Make sure that quarkus-version script returns the stdout / update withMaven to work with the Quarkus' wrapper
Co-authored-by: Christian Beikov <[email protected]>
1 parent c88751b commit d7a0fca

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

ci/quarkus.Jenkinsfile

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pipeline {
1717
agent none
1818
tools {
1919
jdk 'OpenJDK 17 Latest'
20+
maven 'Apache Maven 3.9'
2021
}
2122
options {
2223
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3'))
@@ -46,7 +47,7 @@ pipeline {
4647
}
4748
}
4849
dir('quarkus') {
49-
def latestQuarkusVersion = sh (script: "git ls-remote --heads https://github.com/quarkusio/quarkus.git | grep -oP 'refs/heads/\\K[0-9]+\\.[0-9]+?\$' | sort -V -r | head -n 1").trim()
50+
def latestQuarkusVersion = sh (script: "git ls-remote --heads https://github.com/quarkusio/quarkus.git | grep -oP 'refs/heads/\\K[0-9]+\\.[0-9]+?\$' | sort -V -r | head -n 1", returnStdout: true).trim()
5051
sh "git clone -b ${latestQuarkusVersion} --single-branch https://github.com/quarkusio/quarkus.git . || git reset --hard && git clean -fx && git pull"
5152
script {
5253
def sedStatus = sh (script: "sed -i 's@<hibernate-orm.version>.*</hibernate-orm.version>@<hibernate-orm.version>${env.HIBERNATE_VERSION}</hibernate-orm.version>@' pom.xml", returnStatus: true)
@@ -57,15 +58,18 @@ pipeline {
5758
// Need to override the default maven configuration this way, because there is no other way to do it
5859
sh "sed -i 's/-Xmx5g/-Xmx2048m/' ./.mvn/jvm.config"
5960
sh "echo -e '\\n-XX:MaxMetaspaceSize=1024m'>>./.mvn/jvm.config"
60-
withMaven(mavenLocalRepo: env.WORKSPACE + '/.m2repository', publisherStrategy:'EXPLICIT') {
61-
sh "./mvnw -pl !docs -Dquickly install"
62-
// Need to kill the gradle daemons started during the Maven install run
63-
sh "sudo pkill -f '.*GradleDaemon.*' || true"
64-
// Need to override the default maven configuration this way, because there is no other way to do it
65-
sh "sed -i 's/-Xmx2048m/-Xmx1340m/' ./.mvn/jvm.config"
66-
sh "sed -i 's/MaxMetaspaceSize=1024m/MaxMetaspaceSize=512m/' ./.mvn/jvm.config"
67-
def excludes = "'!integration-tests/kafka-oauth-keycloak,!integration-tests/kafka-sasl-elytron,!integration-tests/hibernate-search-orm-opensearch,!integration-tests/maven,!integration-tests/quartz,!integration-tests/reactive-messaging-kafka,!integration-tests/resteasy-reactive-kotlin/standard,!integration-tests/opentelemetry-reactive-messaging,!integration-tests/virtual-threads/kafka-virtual-threads,!integration-tests/smallrye-jwt-oidc-webapp,!extensions/oidc-db-token-state-manager/deployment,!docs'"
68-
sh "TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED=true ./mvnw -Dinsecure.repositories=WARN -pl :quarkus-hibernate-orm -amd -pl ${excludes} verify -Dstart-containers -Dtest-containers -Dskip.gradle.build"
61+
withMaven(mavenLocalRepo: env.WORKSPACE + '/.m2repository', publisherStrategy: 'EXPLICIT') {
62+
// to account for script-only maven wrapper use in Quarkus:
63+
withEnv(["MAVEN_ARGS=${env.MAVEN_ARGS?:""} ${env.MAVEN_CONFIG}"]) {
64+
sh "./mvnw -pl !docs -Dquickly install"
65+
// Need to kill the gradle daemons started during the Maven install run
66+
sh "sudo pkill -f '.*GradleDaemon.*' || true"
67+
// Need to override the default maven configuration this way, because there is no other way to do it
68+
sh "sed -i 's/-Xmx2048m/-Xmx1340m/' ./.mvn/jvm.config"
69+
sh "sed -i 's/MaxMetaspaceSize=1024m/MaxMetaspaceSize=512m/' ./.mvn/jvm.config"
70+
def excludes = "'!integration-tests/kafka-oauth-keycloak,!integration-tests/kafka-sasl-elytron,!integration-tests/hibernate-search-orm-opensearch,!integration-tests/maven,!integration-tests/quartz,!integration-tests/reactive-messaging-kafka,!integration-tests/resteasy-reactive-kotlin/standard,!integration-tests/opentelemetry-reactive-messaging,!integration-tests/virtual-threads/kafka-virtual-threads,!integration-tests/smallrye-jwt-oidc-webapp,!extensions/oidc-db-token-state-manager/deployment,!docs'"
71+
sh "TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED=true ./mvnw -Dinsecure.repositories=WARN -pl :quarkus-hibernate-orm -amd -pl ${excludes} verify -Dstart-containers -Dtest-containers -Dskip.gradle.build"
72+
}
6973
}
7074
}
7175
}

0 commit comments

Comments
 (0)