-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from xueqzhan/sync-jira
TRT-1475: Update Jira Component and map vsphere variant
- Loading branch information
Showing
31 changed files
with
933 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
data/openshift-gce-devel/ci_analysis_qe/variant_mapping.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package bpfman | ||
|
||
import ( | ||
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
"github.com/openshift-eng/ci-test-mapping/pkg/util" | ||
) | ||
|
||
func identifyCapabilities(test *v1.TestInfo) []string { | ||
capabilities := util.DefaultCapabilities(test) | ||
|
||
return capabilities | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package bpfman | ||
|
||
import ( | ||
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
"github.com/openshift-eng/ci-test-mapping/pkg/config" | ||
) | ||
|
||
type Component struct { | ||
*config.Component | ||
} | ||
|
||
var BpfmanComponent = Component{ | ||
Component: &config.Component{ | ||
Name: "bpfman", | ||
Operators: []string{}, | ||
DefaultJiraComponent: "bpfman", | ||
Matchers: []config.ComponentMatcher{}, | ||
}, | ||
} | ||
|
||
func (c *Component) IdentifyTest(test *v1.TestInfo) (*v1.TestOwnership, error) { | ||
if matcher := c.FindMatch(test); matcher != nil { | ||
jira := matcher.JiraComponent | ||
if jira == "" { | ||
jira = c.DefaultJiraComponent | ||
} | ||
return &v1.TestOwnership{ | ||
Name: test.Name, | ||
Component: c.Name, | ||
JIRAComponent: jira, | ||
Priority: matcher.Priority, | ||
Capabilities: append(matcher.Capabilities, identifyCapabilities(test)...), | ||
}, nil | ||
} | ||
|
||
return nil, nil | ||
} | ||
|
||
func (c *Component) StableID(test *v1.TestInfo) string { | ||
// Look up the stable name for our test in our renamed tests map. | ||
if stableName, ok := c.TestRenames[test.Name]; ok { | ||
return stableName | ||
} | ||
return test.Name | ||
} | ||
|
||
func (c *Component) JiraComponents() (components []string) { | ||
components = []string{c.DefaultJiraComponent} | ||
for _, m := range c.Matchers { | ||
components = append(components, m.JiraComponent) | ||
} | ||
|
||
return components | ||
} |
12 changes: 12 additions & 0 deletions
12
pkg/components/cloudcompute/vsphereprovider/capabilities.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package cloudcomputevsphereprovider | ||
|
||
import ( | ||
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
"github.com/openshift-eng/ci-test-mapping/pkg/util" | ||
) | ||
|
||
func identifyCapabilities(test *v1.TestInfo) []string { | ||
capabilities := util.DefaultCapabilities(test) | ||
|
||
return capabilities | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package cloudcomputevsphereprovider | ||
|
||
import ( | ||
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
"github.com/openshift-eng/ci-test-mapping/pkg/config" | ||
) | ||
|
||
type Component struct { | ||
*config.Component | ||
} | ||
|
||
var VSphereProviderComponent = Component{ | ||
Component: &config.Component{ | ||
Name: "Cloud Compute / vSphere Provider", | ||
Operators: []string{}, | ||
DefaultJiraComponent: "Cloud Compute / vSphere Provider", | ||
Variants: []string{"Platform:vsphere"}, | ||
Matchers: []config.ComponentMatcher{}, | ||
}, | ||
} | ||
|
||
func (c *Component) IdentifyTest(test *v1.TestInfo) (*v1.TestOwnership, error) { | ||
if matcher := c.FindMatch(test); matcher != nil { | ||
jira := matcher.JiraComponent | ||
if jira == "" { | ||
jira = c.DefaultJiraComponent | ||
} | ||
return &v1.TestOwnership{ | ||
Name: test.Name, | ||
Component: c.Name, | ||
JIRAComponent: jira, | ||
Priority: matcher.Priority, | ||
Capabilities: append(matcher.Capabilities, identifyCapabilities(test)...), | ||
}, nil | ||
} | ||
|
||
return nil, nil | ||
} | ||
|
||
func (c *Component) StableID(test *v1.TestInfo) string { | ||
// Look up the stable name for our test in our renamed tests map. | ||
if stableName, ok := c.TestRenames[test.Name]; ok { | ||
return stableName | ||
} | ||
return test.Name | ||
} | ||
|
||
func (c *Component) JiraComponents() (components []string) { | ||
components = []string{c.DefaultJiraComponent} | ||
for _, m := range c.Matchers { | ||
components = append(components, m.JiraComponent) | ||
} | ||
|
||
return components | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package hypershiftaro | ||
|
||
import ( | ||
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
"github.com/openshift-eng/ci-test-mapping/pkg/util" | ||
) | ||
|
||
func identifyCapabilities(test *v1.TestInfo) []string { | ||
capabilities := util.DefaultCapabilities(test) | ||
|
||
return capabilities | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package hypershiftaro | ||
|
||
import ( | ||
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
"github.com/openshift-eng/ci-test-mapping/pkg/config" | ||
) | ||
|
||
type Component struct { | ||
*config.Component | ||
} | ||
|
||
var AROComponent = Component{ | ||
Component: &config.Component{ | ||
Name: "HyperShift / ARO", | ||
Operators: []string{}, | ||
DefaultJiraComponent: "HyperShift / ARO", | ||
Matchers: []config.ComponentMatcher{}, | ||
}, | ||
} | ||
|
||
func (c *Component) IdentifyTest(test *v1.TestInfo) (*v1.TestOwnership, error) { | ||
if matcher := c.FindMatch(test); matcher != nil { | ||
jira := matcher.JiraComponent | ||
if jira == "" { | ||
jira = c.DefaultJiraComponent | ||
} | ||
return &v1.TestOwnership{ | ||
Name: test.Name, | ||
Component: c.Name, | ||
JIRAComponent: jira, | ||
Priority: matcher.Priority, | ||
Capabilities: append(matcher.Capabilities, identifyCapabilities(test)...), | ||
}, nil | ||
} | ||
|
||
return nil, nil | ||
} | ||
|
||
func (c *Component) StableID(test *v1.TestInfo) string { | ||
// Look up the stable name for our test in our renamed tests map. | ||
if stableName, ok := c.TestRenames[test.Name]; ok { | ||
return stableName | ||
} | ||
return test.Name | ||
} | ||
|
||
func (c *Component) JiraComponents() (components []string) { | ||
components = []string{c.DefaultJiraComponent} | ||
for _, m := range c.Matchers { | ||
components = append(components, m.JiraComponent) | ||
} | ||
|
||
return components | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package hypershiftopenstack | ||
|
||
import ( | ||
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
"github.com/openshift-eng/ci-test-mapping/pkg/util" | ||
) | ||
|
||
func identifyCapabilities(test *v1.TestInfo) []string { | ||
capabilities := util.DefaultCapabilities(test) | ||
|
||
return capabilities | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package hypershiftopenstack | ||
|
||
import ( | ||
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
"github.com/openshift-eng/ci-test-mapping/pkg/config" | ||
) | ||
|
||
type Component struct { | ||
*config.Component | ||
} | ||
|
||
var OpenStackComponent = Component{ | ||
Component: &config.Component{ | ||
Name: "HyperShift / OpenStack", | ||
Operators: []string{}, | ||
DefaultJiraComponent: "HyperShift / OpenStack", | ||
Matchers: []config.ComponentMatcher{}, | ||
}, | ||
} | ||
|
||
func (c *Component) IdentifyTest(test *v1.TestInfo) (*v1.TestOwnership, error) { | ||
if matcher := c.FindMatch(test); matcher != nil { | ||
jira := matcher.JiraComponent | ||
if jira == "" { | ||
jira = c.DefaultJiraComponent | ||
} | ||
return &v1.TestOwnership{ | ||
Name: test.Name, | ||
Component: c.Name, | ||
JIRAComponent: jira, | ||
Priority: matcher.Priority, | ||
Capabilities: append(matcher.Capabilities, identifyCapabilities(test)...), | ||
}, nil | ||
} | ||
|
||
return nil, nil | ||
} | ||
|
||
func (c *Component) StableID(test *v1.TestInfo) string { | ||
// Look up the stable name for our test in our renamed tests map. | ||
if stableName, ok := c.TestRenames[test.Name]; ok { | ||
return stableName | ||
} | ||
return test.Name | ||
} | ||
|
||
func (c *Component) JiraComponents() (components []string) { | ||
components = []string{c.DefaultJiraComponent} | ||
for _, m := range c.Matchers { | ||
components = append(components, m.JiraComponent) | ||
} | ||
|
||
return components | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package hypershiftrosa | ||
|
||
import ( | ||
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
"github.com/openshift-eng/ci-test-mapping/pkg/util" | ||
) | ||
|
||
func identifyCapabilities(test *v1.TestInfo) []string { | ||
capabilities := util.DefaultCapabilities(test) | ||
|
||
return capabilities | ||
} |
Oops, something went wrong.