diff --git a/cmd/ci-operator-prowgen/main.go b/cmd/ci-operator-prowgen/main.go index 841e833a2df..7af7a468d6d 100644 --- a/cmd/ci-operator-prowgen/main.go +++ b/cmd/ci-operator-prowgen/main.go @@ -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 diff --git a/pkg/api/config.go b/pkg/api/config.go index 63be80c3714..8cda7e0cae1 100644 --- a/pkg/api/config.go +++ b/pkg/api/config.go @@ -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)...) diff --git a/pkg/api/types.go b/pkg/api/types.go index 8a81723d780..0d006e0d617 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -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"` @@ -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. diff --git a/pkg/load/load_test.go b/pkg/load/load_test.go index c0813e98b0e..9b20ba875ba 100644 --- a/pkg/load/load_test.go +++ b/pkg/load/load_test.go @@ -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 { @@ -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"}, + }, }}, }