This is an automated email from the ASF dual-hosted git repository.
tzimanyi pushed a commit to branch 8.x
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-optaplanner-quickstarts.git
The following commit(s) were added to refs/heads/8.x by this push:
new 2fa17eff kie-issues#667: fix cleanup and settingsXml handling (#613)
2fa17eff is described below
commit 2fa17effeb469b36ef3e489a64b259519cfe5557
Author: Jan Stastny <[email protected]>
AuthorDate: Thu Nov 2 15:27:03 2023 +0100
kie-issues#667: fix cleanup and settingsXml handling (#613)
* kie-issues#667: fix cleanup and settingsXml handling
* adjust also MavenCommands passed to maven library methods
---------
Co-authored-by: jstastny-cz <[email protected]>
---
.ci/jenkins/Jenkinsfile.setup-branch | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile.setup-branch
b/.ci/jenkins/Jenkinsfile.setup-branch
index 160b2014..1d50743e 100644
--- a/.ci/jenkins/Jenkinsfile.setup-branch
+++ b/.ci/jenkins/Jenkinsfile.setup-branch
@@ -30,7 +30,7 @@ pipeline {
stage('Initialize') {
steps {
script {
- cleanWs()
+ cleanWs(disableDeferredWipeout: true)
if (params.DISPLAY_NAME) {
currentBuild.displayName = params.DISPLAY_NAME
@@ -45,17 +45,34 @@ pipeline {
stage('Build OptaPlanner parents') {
steps {
script {
- getMavenCommand(optaplannerRepo)
- .withOptions(['-U', '-pl
org.optaplanner:optaplanner-build-parent,org.optaplanner:optaplanner-bom,org.optaplanner:optaplanner-operator',
'-am'])
- .run('clean install')
+ configFileProvider([configFile(fileId:
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ getMavenCommand(optaplannerRepo)
+ .withOptions([
+ '-U',
+ '-pl
org.optaplanner:optaplanner-build-parent,org.optaplanner:optaplanner-bom,org.optaplanner:optaplanner-operator',
+ '-am'
+ ])
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .run('clean install')
+ }
}
}
}
stage('Update project version') {
steps {
script {
-
maven.mvnSetVersionProperty(getMavenCommand(getRepoName()),
'version.org.optaplanner', getOptaPlannerVersion())
-
maven.mvnVersionsUpdateParentAndChildModules(getMavenCommand(getRepoName()),
getOptaPlannerVersion(), true)
+ configFileProvider([configFile(fileId:
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ maven.mvnSetVersionProperty(
+
getMavenCommand(getRepoName()).withSettingsXmlFile(MAVEN_SETTINGS_FILE),
+ 'version.org.optaplanner',
+ getOptaPlannerVersion()
+ )
+ maven.mvnVersionsUpdateParentAndChildModules(
+
getMavenCommand(getRepoName()).withSettingsXmlFile(MAVEN_SETTINGS_FILE),
+ getOptaPlannerVersion(),
+ true
+ )
+ }
dir(getRepoName()) {
sh "find . -name build.gradle -exec sed -i -E 's/def
optaplannerVersion = \"[^\"\\s]+\"/def optaplannerVersion =
\"${getOptaPlannerVersion()}\"/' {} \\;"
@@ -89,7 +106,7 @@ pipeline {
}
cleanup {
script {
- util.cleanNode('docker')
+ util.cleanNode()
}
}
}
@@ -136,6 +153,5 @@ String getGitAuthorCredsID() {
MavenCommand getMavenCommand(String directory) {
return new MavenCommand(this, ['-fae', '-ntp'])
- .withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
.inDirectory(directory)
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]