Skip to content

Commit 29eb6bb

Browse files
committed
NO-JIRA: match external topology
1 parent 7a4806d commit 29eb6bb

File tree

2 files changed

+55
-44
lines changed

2 files changed

+55
-44
lines changed

pkg/variantregistry/ocp.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,21 @@ func setTopology(_ logrus.FieldLogger, variants map[string]string, jobName strin
731731
{"-hypershift", "external"},
732732
{"-hcp", "external"},
733733
{"_hcp", "external"},
734+
{"-external", "external"},
734735
{"-compact", "compact"},
735736
{"-microshift", "microshift"},
736737
}
737738

739+
// the use of external-lb in these cases do not apply to topology so drop them out from evaluation
740+
ignorePatterns := []string{"-external-lb-", "-externallb"}
741+
for _, ignore := range ignorePatterns {
742+
replace := "-"
743+
if ignore[len(ignore)-1] != '-' {
744+
replace = ""
745+
}
746+
jobNameLower = strings.ReplaceAll(jobNameLower, ignore, replace)
747+
}
748+
738749
for _, entry := range topologyPatterns {
739750
if strings.Contains(jobNameLower, entry.substring) {
740751
variants[VariantTopology] = entry.topology

0 commit comments

Comments
 (0)