
This is just a frame for command that will execute docker container with ISO builder scripts Change-Id: I59a5c494785af3cbcffd3b9f6a488d93f73f4878
25 lines
677 B
Go
25 lines
677 B
Go
package bootstrap
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
|
|
"opendev.org/airship/airshipctl/pkg/bootstrap/isogen"
|
|
"opendev.org/airship/airshipctl/pkg/environment"
|
|
)
|
|
|
|
// NewISOGenCommand creates a new command for ISO image creation
|
|
func NewISOGenCommand(parent *cobra.Command, rootSettings *environment.AirshipCTLSettings) *cobra.Command {
|
|
settings := &isogen.Settings{AirshipCTLSettings: rootSettings}
|
|
imageGen := &cobra.Command{
|
|
Use: "isogen",
|
|
Short: "Generate bootstrap ISO image",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return isogen.GenerateBootstrapIso(settings, args, cmd.OutOrStdout())
|
|
},
|
|
}
|
|
|
|
settings.InitFlags(imageGen)
|
|
|
|
return imageGen
|
|
}
|