tkobayas commented on code in PR #1987:
URL: 
https://github.com/apache/incubator-kie-kogito-examples/pull/1987#discussion_r1696420458


##########
.ci/jenkins/Jenkinsfile.setup-branch:
##########
@@ -93,9 +93,21 @@ pipeline {
             steps {
                 script {
                     dir(getRepoName()) {
-                        def oldKogitoVersion = readMavenPom(file: 
'pom.xml').version
+                        def pom = readMavenPom(file: 'pom.xml');
+                        def oldKogitoVersion = pom.version
+                        if (oldKogitoVersion == null) {
+                            echo "pom version is null. Using parent pom 
version"
+                            oldKogitoVersion = pom.parent.version
+                        }
                         echo "Got old Kogito version ${oldKogitoVersion}"
                         configFileProvider([configFile(fileId: 
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+                            // special case for 
serverless-workflow-examples-parent
+                            maven.mvnVersionsSet(
+                                    
getMavenCommand('serverless-workflow-examples/serverless-workflow-examples-parent').withSettingsXmlFile(MAVEN_SETTINGS_FILE),
+                                    getKogitoVersion(),
+                                    true,
+                                    false
+                            )

Review Comment:
   serverless-workflow-examples project versions were not updated by 
`mvnVersionsUpdateParentAndChildModules`, because 
`serverless-workflow-examples-parent` itself was not updated. So I explicitly 
call `mvnVersionsSet`. The project directory is hard-coded, but I couldn't find 
another approach. Let me know if there is a better way.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to