Skip to content

Commit 1344f6a

Browse files
Merge pull request #216 from markusthoemmes/add-upi-src-template
Add UPI-src template to prowgen.
2 parents 4255f12 + 152d6c4 commit 1344f6a

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

cmd/ci-operator-prowgen/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ func generatePodSpecTemplate(info *config.Info, secret *cioperatorapi.Secret, re
235235
} else if conf := test.OpenshiftInstallerUPIClusterTestConfiguration; conf != nil {
236236
template = "cluster-launch-installer-upi-e2e"
237237
clusterProfile = conf.ClusterProfile
238+
} else if conf := test.OpenshiftInstallerUPISrcClusterTestConfiguration; conf != nil {
239+
template = "cluster-launch-installer-upi-src"
240+
clusterProfile = conf.ClusterProfile
238241
} else if conf := test.OpenshiftInstallerConsoleClusterTestConfiguration; conf != nil {
239242
template = "cluster-launch-installer-console"
240243
clusterProfile = conf.ClusterProfile

pkg/api/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ func validateTestConfigurationType(fieldRoot string, test TestStepConfiguration,
265265
typeCount++
266266
validationErrors = append(validationErrors, validateClusterProfile(fieldRoot, testConfig.ClusterProfile)...)
267267
}
268+
if testConfig := test.OpenshiftInstallerUPISrcClusterTestConfiguration; testConfig != nil {
269+
typeCount++
270+
validationErrors = append(validationErrors, validateClusterProfile(fieldRoot, testConfig.ClusterProfile)...)
271+
}
268272
if testConfig := test.OpenshiftInstallerConsoleClusterTestConfiguration; testConfig != nil {
269273
typeCount++
270274
validationErrors = append(validationErrors, validateClusterProfile(fieldRoot, testConfig.ClusterProfile)...)

pkg/api/types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ type TestStepConfiguration struct {
341341
OpenshiftInstallerClusterTestConfiguration *OpenshiftInstallerClusterTestConfiguration `json:"openshift_installer,omitempty"`
342342
OpenshiftInstallerSrcClusterTestConfiguration *OpenshiftInstallerSrcClusterTestConfiguration `json:"openshift_installer_src,omitempty"`
343343
OpenshiftInstallerUPIClusterTestConfiguration *OpenshiftInstallerUPIClusterTestConfiguration `json:"openshift_installer_upi,omitempty"`
344+
OpenshiftInstallerUPISrcClusterTestConfiguration *OpenshiftInstallerUPISrcClusterTestConfiguration `json:"openshift_installer_upi_src,omitempty"`
344345
OpenshiftInstallerConsoleClusterTestConfiguration *OpenshiftInstallerConsoleClusterTestConfiguration `json:"openshift_installer_console,omitempty"`
345346
OpenshiftInstallerRandomClusterTestConfiguration *OpenshiftInstallerRandomClusterTestConfiguration `json:"openshift_installer_random,omitempty"`
346347
OpenshiftInstallerCustomTestImageClusterTestConfiguration *OpenshiftInstallerCustomTestImageClusterTestConfiguration `json:"openshift_installer_custom_test_image,omitempty"`
@@ -596,6 +597,14 @@ type OpenshiftInstallerUPIClusterTestConfiguration struct {
596597
ClusterTestConfiguration `json:",inline"`
597598
}
598599

600+
// OpenshiftInstallerUPISrcClusterTestConfiguration describes a
601+
// test that provisions machines using installer-upi image and
602+
// installs the cluster using UPI flow. Tests will be run
603+
// akin to the OpenshiftInstallerSrcClusterTestConfiguration.
604+
type OpenshiftInstallerUPISrcClusterTestConfiguration struct {
605+
ClusterTestConfiguration `json:",inline"`
606+
}
607+
599608
// OpenshiftInstallerRandomClusterTestConfiguration describes a
600609
// that provisions a cluster using openshift-installer in a provider
601610
// chosen randomly and runs conformance tests.

pkg/load/load_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ tests:
256256
commands: TEST_SUITE=openshift/conformance/serial run-tests
257257
openshift_installer_upi:
258258
cluster_profile: aws
259+
- as: e2e-upi-src-vsphere
260+
commands: make tests
261+
openshift_installer_upi_src:
262+
cluster_profile: vsphere
259263
`
260264

261265
func strP(str string) *string {
@@ -507,6 +511,12 @@ var parsedConfig = &api.ReleaseBuildConfiguration{
507511
OpenshiftInstallerUPIClusterTestConfiguration: &api.OpenshiftInstallerUPIClusterTestConfiguration{
508512
ClusterTestConfiguration: api.ClusterTestConfiguration{ClusterProfile: "aws"},
509513
},
514+
}, {
515+
As: "e2e-upi-src-vsphere",
516+
Commands: `make tests`,
517+
OpenshiftInstallerUPISrcClusterTestConfiguration: &api.OpenshiftInstallerUPISrcClusterTestConfiguration{
518+
ClusterTestConfiguration: api.ClusterTestConfiguration{ClusterProfile: "vsphere"},
519+
},
510520
}},
511521
}
512522

0 commit comments

Comments
 (0)