Skip to content

Add UPI-src template to prowgen. #216

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions cmd/ci-operator-prowgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ func generatePodSpecTemplate(info *config.Info, secret *cioperatorapi.Secret, re
} else if conf := test.OpenshiftInstallerUPIClusterTestConfiguration; conf != nil {
template = "cluster-launch-installer-upi-e2e"
clusterProfile = conf.ClusterProfile
} else if conf := test.OpenshiftInstallerUPISrcClusterTestConfiguration; conf != nil {
template = "cluster-launch-installer-upi-src"
clusterProfile = conf.ClusterProfile
} else if conf := test.OpenshiftInstallerConsoleClusterTestConfiguration; conf != nil {
template = "cluster-launch-installer-console"
clusterProfile = conf.ClusterProfile
Expand Down
4 changes: 4 additions & 0 deletions pkg/api/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ func validateTestConfigurationType(fieldRoot string, test TestStepConfiguration,
typeCount++
validationErrors = append(validationErrors, validateClusterProfile(fieldRoot, testConfig.ClusterProfile)...)
}
if testConfig := test.OpenshiftInstallerUPISrcClusterTestConfiguration; testConfig != nil {
typeCount++
validationErrors = append(validationErrors, validateClusterProfile(fieldRoot, testConfig.ClusterProfile)...)
}
if testConfig := test.OpenshiftInstallerConsoleClusterTestConfiguration; testConfig != nil {
typeCount++
validationErrors = append(validationErrors, validateClusterProfile(fieldRoot, testConfig.ClusterProfile)...)
Expand Down
9 changes: 9 additions & 0 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ type TestStepConfiguration struct {
OpenshiftInstallerClusterTestConfiguration *OpenshiftInstallerClusterTestConfiguration `json:"openshift_installer,omitempty"`
OpenshiftInstallerSrcClusterTestConfiguration *OpenshiftInstallerSrcClusterTestConfiguration `json:"openshift_installer_src,omitempty"`
OpenshiftInstallerUPIClusterTestConfiguration *OpenshiftInstallerUPIClusterTestConfiguration `json:"openshift_installer_upi,omitempty"`
OpenshiftInstallerUPISrcClusterTestConfiguration *OpenshiftInstallerUPISrcClusterTestConfiguration `json:"openshift_installer_upi_src,omitempty"`
OpenshiftInstallerConsoleClusterTestConfiguration *OpenshiftInstallerConsoleClusterTestConfiguration `json:"openshift_installer_console,omitempty"`
OpenshiftInstallerRandomClusterTestConfiguration *OpenshiftInstallerRandomClusterTestConfiguration `json:"openshift_installer_random,omitempty"`
OpenshiftInstallerCustomTestImageClusterTestConfiguration *OpenshiftInstallerCustomTestImageClusterTestConfiguration `json:"openshift_installer_custom_test_image,omitempty"`
Expand Down Expand Up @@ -596,6 +597,14 @@ type OpenshiftInstallerUPIClusterTestConfiguration struct {
ClusterTestConfiguration `json:",inline"`
}

// OpenshiftInstallerUPISrcClusterTestConfiguration describes a
// test that provisions machines using installer-upi image and
// installs the cluster using UPI flow. Tests will be run
// akin to the OpenshiftInstallerSrcClusterTestConfiguration.
type OpenshiftInstallerUPISrcClusterTestConfiguration struct {
ClusterTestConfiguration `json:",inline"`
}

// OpenshiftInstallerRandomClusterTestConfiguration describes a
// that provisions a cluster using openshift-installer in a provider
// chosen randomly and runs conformance tests.
Expand Down
10 changes: 10 additions & 0 deletions pkg/load/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ tests:
commands: TEST_SUITE=openshift/conformance/serial run-tests
openshift_installer_upi:
cluster_profile: aws
- as: e2e-upi-src-vsphere
commands: make tests
openshift_installer_upi_src:
cluster_profile: vsphere
`

func strP(str string) *string {
Expand Down Expand Up @@ -507,6 +511,12 @@ var parsedConfig = &api.ReleaseBuildConfiguration{
OpenshiftInstallerUPIClusterTestConfiguration: &api.OpenshiftInstallerUPIClusterTestConfiguration{
ClusterTestConfiguration: api.ClusterTestConfiguration{ClusterProfile: "aws"},
},
}, {
As: "e2e-upi-src-vsphere",
Commands: `make tests`,
OpenshiftInstallerUPISrcClusterTestConfiguration: &api.OpenshiftInstallerUPISrcClusterTestConfiguration{
ClusterTestConfiguration: api.ClusterTestConfiguration{ClusterProfile: "vsphere"},
},
}},
}

Expand Down