This is an automated email from the ASF dual-hosted git repository.

rantunes pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/incubator-kie-optaplanner.git


The following commit(s) were added to refs/heads/10.0.x by this push:
     new 10b0ea43e8 [10.0.x] NO-ISSUE: Disable generate-code-tests goal and 
fixes for the release job (#3121)
10b0ea43e8 is described below

commit 10b0ea43e82ed761766177b771db31f2d6df4c82
Author: Rodrigo Antunes <[email protected]>
AuthorDate: Fri Aug 23 13:04:25 2024 -0300

    [10.0.x] NO-ISSUE: Disable generate-code-tests goal and fixes for the 
release job (#3121)
    
    Disable generate-code-tests goal and fixes for the release job
---
 .ci/jenkins/Jenkinsfile.deploy | 66 +++++++++++++++++++-----------------------
 optaplanner-operator/pom.xml   |  3 +-
 2 files changed, 31 insertions(+), 38 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index 7684fa089e..854766ca68 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -118,12 +118,10 @@ pipeline {
             }
             steps {
                 script {
-                    configFileProvider([configFile(fileId: 
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
-                        if (getDroolsVersion()) {
-                            
maven.mvnSetVersionProperty(getOptaplannerMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE),
 'version.org.drools', getDroolsVersion())
-                        }
-                        
maven.mvnVersionsSet(getOptaplannerMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE),
 getProjectVersion(), !isRelease())
+                    if (getDroolsVersion()) {
+                        
maven.mvnSetVersionProperty(getOptaplannerMavenCommand(), 'version.org.drools', 
getDroolsVersion())
                     }
+                    maven.mvnVersionsSet(getOptaplannerMavenCommand(), 
getProjectVersion(), !isRelease())
                     mavenCleanInstallOptaPlannerParents()
                     updateQuickstartsVersions()
                 }
@@ -173,12 +171,16 @@ pipeline {
         stage('Build Quickstarts') {
             steps {
                 script {
-                    configFileProvider([configFile(fileId: 
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
-                        getOptaplannerQuickstartsMavenCommand()
+                    withCredentials([usernamePassword(credentialsId: 
env.MAVEN_REPO_CREDS_ID, usernameVariable: 'REPOSITORY_USER', passwordVariable: 
'REPOSITORY_TOKEN')]) {
+                        configFileProvider([configFile(fileId: 
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
+                            getOptaplannerQuickstartsMavenCommand()
                                 .withProperty('maven.test.failure.ignore', 
true)
                                 .skipTests(params.SKIP_TESTS)
                                 .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+                                .withProperty('apache.repository.username', 
REPOSITORY_USER)
+                                .withProperty('apache.repository.password', 
REPOSITORY_TOKEN)
                                 .run('clean install')
+                        }
                     }
                 }
             }
@@ -270,14 +272,20 @@ void sendErrorNotification() {
     }
 }
 
-List getIntegrationTestProfiles() {
-    return params.SKIP_INTEGRATION_TESTS ? [] : ['integration-tests']
-}
-
 void updateQuickstartsVersions() {
-    configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, 
variable: 'MAVEN_SETTINGS_FILE')]) {
-        
maven.mvnSetVersionProperty(getOptaplannerQuickstartsMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE),
 'version.org.optaplanner', getProjectVersion())
-        
maven.mvnVersionsUpdateParentAndChildModules(getOptaplannerQuickstartsMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE),
 getProjectVersion(), !isRelease())
+    maven.mvnSetVersionProperty(getOptaplannerQuickstartsMavenCommand(), 
'version.org.optaplanner', getProjectVersion())
+    maven.mvnVersionsUpdateParent(getOptaplannerQuickstartsMavenCommand(), 
getProjectVersion(), !isRelease())
+
+    withCredentials([usernamePassword(credentialsId: env.MAVEN_REPO_CREDS_ID, 
usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
+        configFileProvider([configFile(fileId: 
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
+            maven.mvnVersionsUpdateChildModules(
+                getOptaplannerQuickstartsMavenCommand()
+                    .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+                    .withProperty('apache.repository.username', 
REPOSITORY_USER)
+                    .withProperty('apache.repository.password', 
REPOSITORY_TOKEN),
+                !isRelease()
+            )
+        }
     }
 
     gradleVersionsUpdate(quickstartsFolder, getProjectVersion())
@@ -291,6 +299,7 @@ void updateQuickstartsVersions() {
                             'cat', returnStdout: true)
         }
     }
+
     if (isCreatePr()) {
         dir(quickstartsFolder) {
             // TODO: Remove the exclusion after the kubernetes demo is 
migrated to 9.
@@ -411,36 +420,19 @@ MavenCommand getOptaplannerQuickstartsMavenCommand() {
  * Builds the parent modules and the BOM so that project depending on these 
artifacts can resolve.
  */
 void mavenCleanInstallOptaPlannerParents() {
-    configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, 
variable: 'MAVEN_SETTINGS_FILE')]) {
-        getOptaplannerMavenCommand()
+    withCredentials([usernamePassword(credentialsId: env.MAVEN_REPO_CREDS_ID, 
usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) {
+        configFileProvider([configFile(fileId: 
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
+            getOptaplannerMavenCommand()
                 .skipTests(true)
                 .withOptions(['-U', '-pl 
org.optaplanner:optaplanner-build-parent,org.optaplanner:optaplanner-bom', 
'-am'])
                 .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+                .withProperty('apache.repository.username', REPOSITORY_USER)
+                .withProperty('apache.repository.password', REPOSITORY_TOKEN)
                 .run('clean install')
+        }
     }
 }
 
-void runMavenDeploy(MavenCommand mvnCmd, String localDeploymentId = '') {
-    mvnCmd = mvnCmd.clone()
-
-    if (localDeploymentId) {
-        
mvnCmd.withLocalDeployFolder(getLocalDeploymentFolder(localDeploymentId))
-    } else if (env.MAVEN_DEPLOY_REPOSITORY) {
-        mvnCmd.withDeployRepository(env.MAVEN_DEPLOY_REPOSITORY)
-    }
-
-    configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, 
variable: 'MAVEN_SETTINGS_FILE')]) {
-        mvnCmd
-          .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
-          .skipTests(true)
-          .run('clean deploy')
-    }
-}
-
-String getMavenRepoZipUrl() {
-    return "${params.MAVEN_DEPLOY_REPOSITORY.replaceAll('/content/', 
'/service/local/').replaceFirst('/*$', '')}/content-compressed"
-}
-
 // Getters and Setters of params/properties
 
 boolean shouldDeployToRepository() {
diff --git a/optaplanner-operator/pom.xml b/optaplanner-operator/pom.xml
index 2325458768..beadd0623b 100644
--- a/optaplanner-operator/pom.xml
+++ b/optaplanner-operator/pom.xml
@@ -115,7 +115,8 @@
             <goals>
               <goal>build</goal>
               <goal>generate-code</goal>
-              <goal>generate-code-tests</goal>
+              <!-- Disabled for the Apache 10 release as it was causing errors 
during the operator build
+              <goal>generate-code-tests</goal>-->
             </goals>
           </execution>
         </executions>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to