Skip to content
This repository was archived by the owner on Jun 14, 2019. It is now read-only.
Open
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
4 changes: 2 additions & 2 deletions pkg/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func FromConfig(
addProvidesForStep(initialReleaseStep, params)
buildSteps = append(buildSteps, initialReleaseStep)

} else if rawStep.TestStepConfiguration != nil && rawStep.TestStepConfiguration.OpenshiftInstallerClusterTestConfiguration != nil && rawStep.TestStepConfiguration.OpenshiftInstallerClusterTestConfiguration.Upgrade {
} else if rawStep.TestStepConfiguration != nil && rawStep.TestStepConfiguration.OpenshiftInstallerClusterTestConfiguration != nil {
var err error
step, err = clusterinstall.E2ETestStep(*rawStep.TestStepConfiguration.OpenshiftInstallerClusterTestConfiguration, *rawStep.TestStepConfiguration, params, podClient, templateClient, secretGetter, artifactDir, jobSpec)
if err != nil {
Expand Down Expand Up @@ -412,7 +412,7 @@ func stepConfigsForBuild(config *api.ReleaseBuildConfiguration, jobSpec *api.Job
switch {
case test.ContainerTestConfiguration != nil:
buildSteps = append(buildSteps, api.StepConfiguration{TestStepConfiguration: test})
case test.OpenshiftInstallerClusterTestConfiguration != nil && test.OpenshiftInstallerClusterTestConfiguration.Upgrade:
case test.OpenshiftInstallerClusterTestConfiguration != nil:
buildSteps = append(buildSteps, api.StepConfiguration{TestStepConfiguration: test})
}
}
Expand Down
30 changes: 15 additions & 15 deletions pkg/steps/clusterinstall/clusterinstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,22 @@ func E2ETestStep(

template.Name = testConfig.As

if config.Upgrade {
overrides := make(map[string]string)
for i := range template.Parameters {
p := &template.Parameters[i]
switch p.Name {
case "JOB_NAME_SAFE":
if !params.HasInput(p.Name) {
overrides[p.Name] = testConfig.As
}
case "TEST_COMMAND":
p.Value = testConfig.Commands
case "CLUSTER_TYPE":
p.Value = strings.Split(string(config.ClusterProfile), "-")[0]
overrides := make(map[string]string)
for i := range template.Parameters {
p := &template.Parameters[i]
switch p.Name {
case "JOB_NAME_SAFE":
if !params.HasInput(p.Name) {
overrides[p.Name] = testConfig.As
}
case "TEST_COMMAND":
p.Value = testConfig.Commands
case "CLUSTER_TYPE":
p.Value = strings.Split(string(config.ClusterProfile), "-")[0]
}
}

if config.Upgrade {
// ensure we depend on the release image
name := "RELEASE_IMAGE_INITIAL"
template.Parameters = append(template.Parameters, templateapi.Parameter{
Expand All @@ -90,10 +90,10 @@ func E2ETestStep(
Name: name,
Value: "true",
})

params = api.NewOverrideParameters(params, overrides)
}

params = api.NewOverrideParameters(params, overrides)

step := steps.TemplateExecutionStep(template, params, podClient, templateClient, artifactDir, jobSpec)
subTests, ok := step.(nestedSubTests)
if !ok {
Expand Down