Skip to content

Commit

Permalink
Disable interactive
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo2308 committed Oct 29, 2024
1 parent 39481bd commit 4cfea32
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions internal/testutils/olm.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,20 @@ func (tc TestContext) AddPackagemanifestsTarget(operatorType projutil.OperatorTy
return nil
}

// DisableManifestsInteractiveMode will update the Makefile to disable the interactive mode
func (tc TestContext) DisableManifestsInteractiveMode() error {
// Todo: check if we cannot improve it since the replace/content will exists in the
// pkgmanifest target if it be scaffolded before this call
content := "$(OPERATOR_SDK) generate kustomize manifests"
replace := content + " --interactive=false"
return ReplaceInFile(filepath.Join(tc.Dir, "Makefile"), content, replace)
}

// GenerateBundle runs all commands to create an operator bundle.
func (tc TestContext) GenerateBundle() error {
if err := tc.DisableManifestsInteractiveMode(); err != nil {
return err
}

return tc.Make("bundle", "IMG="+tc.ImageName)
}

0 comments on commit 4cfea32

Please sign in to comment.