Skip to content

Commit

Permalink
fix: magefile configuration to create vsphere infa override file
Browse files Browse the repository at this point in the history
  • Loading branch information
supershal committed Aug 21, 2024
1 parent 9b114a7 commit fa99aa0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ func RunE2e(buildOS, buildConfig, buildInfra string, dryRun bool) error {
}
}

if buildOS == "flatcar" || buildOS == "ubuntu 20.04" && buildInfra == ova {
flatcarOverride := "packer-ova-flatcar-override.yaml"
flatcarOverrideFlag := fmt.Sprintf("--overrides=%s", flatcarOverride)
overrideFlagForCmd = append(overrideFlagForCmd, flatcarOverrideFlag)
fmt.Printf("making flatcar/ubuntu override %s \n", flatcarOverride)
if buildConfig == basic && buildInfra == ova {
basicOverride := "packer-ova-basic-override.yaml"
basicOverrideFlag := fmt.Sprintf("--overrides=%s", basicOverride)
overrideFlagForCmd = append(overrideFlagForCmd, basicOverrideFlag)
fmt.Printf("making basic override %s \n", basicOverride)
// TODO: @faiq - move this to mage
if err := sh.RunV("make", flatcarOverride); err != nil {
return fmt.Errorf("failed to override for flatcar ova %s %v", flatcarOverride, err)
if err := sh.RunV("make", basicOverride); err != nil {
return fmt.Errorf("failed to override for basic ova %s %v", basicOverride, err)
}
}

Expand Down Expand Up @@ -411,7 +411,6 @@ func createOSBundle(osName, kubernetesVersion, downloadDir string, fips, gpu boo
}
if osName == "redhat 8.8" || osName == "redhat 8.6" {
args = append(args, "--enable-eus-repos=true")

}
if gpu {
args = append(args, "--fetch-kernel-headers=true")
Expand Down
4 changes: 2 additions & 2 deletions test/infra/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ packer-aws-offline-override.yaml: infra.aws.create install-envsubst
packer-ova-offline-override.yaml: infra.vsphere.create install-envsubst
@$(INFRA_MODULES_DIR)/vsphere/export.sh $@

packer-ova-flatcar-override.yaml: install-envsubst
"${ENVSUBST_ASSETS}"/envsubst < "$(INFRA_MODULES_DIR)"/vsphere/packer-vsphere-flatcar.yaml.tmpl > $@
packer-ova-basic-override.yaml: install-envsubst
"${ENVSUBST_ASSETS}"/envsubst < "$(INFRA_MODULES_DIR)"/vsphere/packer-vsphere-basic.yaml.tmpl > $@

.PHONY: infra.aws.destroy
infra.aws.destroy: ## Destroy infrastructure
Expand Down

0 comments on commit fa99aa0

Please sign in to comment.