-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[incubator-kie-issues-1401] Fix build kogito-examples.build-and-test in kogito nightly.native folder #1987
[incubator-kie-issues-1401] Fix build kogito-examples.build-and-test in kogito nightly.native folder #1987
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
) | ||
Comment on lines
+104
to
+110
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. serverless-workflow-examples project versions were not updated by |
||
maven.mvnVersionsUpdateParentAndChildModules( | ||
getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE), | ||
getKogitoVersion(), | ||
|
@@ -119,9 +131,10 @@ pipeline { | |
} | ||
|
||
if (getKogitoVersion() != oldKogitoVersion) { | ||
def status = sh(script: "grep -ir '${oldKogitoVersion}' --include='pom.xml'", returnStatus: true) | ||
def status = sh(script: "grep -ir '>${oldKogitoVersion}<' --include='pom.xml'", returnStatus: true) | ||
Comment on lines
-122
to
+134
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously |
||
if (status == 0) { | ||
error "Old Kogito version ${oldKogitoVersion} is still present into the project... Please review it..." | ||
// some orphaned projects may still have the old version. not an error | ||
echo "Old Kogito version ${oldKogitoVersion} is still present into the project... Please review it..." | ||
Comment on lines
-124
to
+137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we may still have old versions because some projects are orphaned (not associated by
Btw, previously, |
||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that
oldKogitoVersion
wasnull
in past logs becausereadMavenPom
cannot resolve the parent version (I cannot find a reason from logs). But locally confirmed thatpom.parent.version
returns the expected version.