Skip to content
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

Update to handle tip builds with no version number #806

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions test-result-summary-client/src/Build/Summary/ResultSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,14 @@ export default function ResultSummary() {
jdkImpl = 'j9';
}
// use non-capture group to ignore words evaluation and release if present
const regex =
/^jdk(\d+).?(?:-evaluation|-release)?-(\w+)-(\w+)-(\w+)/i;
const regex = /^jdk(\d*).?(?:-evaluation|-release)?-(\w+)-(\w+)-(\w+)/i;
const tokens = buildName.match(regex);
if (Array.isArray(tokens) && tokens.length > 4) {
jdkVersion = tokens[1];
if (jdkVersion == '') {
// JDK_TIP_VERSION is currently 21, needs updating when tip changes
jdkVersion = 21;
karianna marked this conversation as resolved.
Show resolved Hide resolved
}
if (buildName.includes('alpine-linux')) {
platform = `${tokens[4]}_alpine-linux`;
if (buildName.includes('x64')) {
Expand All @@ -133,8 +136,7 @@ export default function ResultSummary() {
}
}
} else if (buildName.startsWith('build')) {
const regex =
/Build_JDK(.+?)_(.+?_.+?(_xl|_fips)?)(_.+)?$/i;
const regex = /Build_JDK(.+?)_(.+?_.+?(_xl|_fips)?)(_.+)?$/i;
const tokens = buildName.match(regex);
if (Array.isArray(tokens) && tokens.length > 3) {
jdkVersion = tokens[1];
Expand Down