Skip to content

Commit

Permalink
additional regex for getAllChildBuilds
Browse files Browse the repository at this point in the history
Signed-off-by: Shelley Lambert <[email protected]>
  • Loading branch information
smlambert committed Dec 14, 2024
1 parent 12e96f0 commit 79f44d1
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test-result-summary-client/src/Build/Summary/ResultSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function ResultSummary() {
// get all SDK builds info
const sdkBuildsRes = fetchData(
`/api/getAllChildBuilds${params({
buildNameRegex: '^(jdk[0-9]{1,2}|Build_)',
buildNameRegex: '^(jdk[0-9]{1,2}|jdk-|Build_)',
parentId,
})}`
);
Expand Down Expand Up @@ -93,8 +93,11 @@ export default function ResultSummary() {
if (buildName.includes('_smoketests')) {
level = 'extended';
}

let jdkVersion, platform, jdkImpl;
const parentRegex = /openjdk(\d+)-pipeline/i;
const parenttokens =
parentBuildInfo.buildName.match(parentRegex);
jdkVersion = parenttokens[1];

if (buildName.startsWith('jdk')) {
// SDK build and Smoke test platform format does not match with test build. Need to match the platform value.
Expand All @@ -121,12 +124,8 @@ export default function ResultSummary() {
/^jdk(\d*).?(?:-evaluation|-release)?-(\w+)-(\w+)-(\w+)/i;
const tokens = buildName.match(regex);
if (Array.isArray(tokens) && tokens.length > 4) {
jdkVersion = tokens[1];
const parentRegex = /openjdk(\d+)-pipeline/i;
if (jdkVersion == '' && parentBuildInfo.buildName) {
jdkVersion =
parentBuildInfo.buildName.match(parentRegex)
.tokens[1];
if (!jdkVersion && tokens[1]) {
jdkVersion = tokens[1];
}
if (buildName.includes('alpine-linux')) {
platform = `${tokens[4]}_alpine-linux`;
Expand Down

0 comments on commit 79f44d1

Please sign in to comment.