Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Build = &cobra.Command{ Use: "build", Short: "Build Docker image from Zip", Long: `TODO`, Run: func(cmd *cobra.Command, args []string) { var configReader = config.NewInClusterConfigReader() var nexusDownloader nexus.Downloader if verbose { logrus.SetLevel(logrus.DebugLevel) } else { logrus.SetLevel(logrus.InfoLevel) } if len(cmd.Flag("fileconfig").Value.String()) != 0 { conf := cmd.Flag("fileconfig").Value.String() logrus.Debugf("Using config from %s", conf) configReader = config.NewFileConfigReader(conf) } c, err := configReader.ReadConfig() if err != nil { logrus.Fatalf("Could not read configuration: %s", err) } var binaryInput string if c.BinaryBuild { binaryInput, err = util.ExtractBinaryFromStdIn() if err != nil { logrus.Fatalf("Could not read binary input: %s", err) } } if c.BinaryBuild { nexusDownloader = nexus.NewBinaryDownloader(binaryInput) } else { mavenRepo := c.NexusAccess.NexusUrl logrus.Debugf("Using Maven repo on %s", mavenRepo) nexusDownloader = nexus.NewNexusDownloader(mavenRepo) } RunArchitect(RunConfiguration{ NexusDownloader: nexusDownloader, Config: c, RegistryCredentialsFunc: docker.LocalRegistryCredentials(), }) }, }
Functions ¶
func RunArchitect ¶
func RunArchitect(configuration RunConfiguration)
Types ¶
type RunConfiguration ¶ added in v1.2.0
type RunConfiguration struct { NexusDownloader nexus.Downloader Config *config.Config RegistryCredentialsFunc func(string) (*docker.RegistryCredentials, error) }
Click to show internal directories.
Click to hide internal directories.