Exemplo n.º 1
0
func main() {
	managerd := server.New()
	config := &OoyalaServerConfig{}
	_, err := toml.DecodeFile(managerd.Opts.ConfigFile, config)
	if err != nil {
		log.Fatalln(err)
	}
	log.Printf("Initializing Jenkins Builder with URI: %s", config.JenkinsURI)
	bldr := builder.NewJenkinsBuilder(config.JenkinsURI, "Jenkins Builder")
	managerd.Run(bldr)
}
Exemplo n.º 2
0
func main() {
	managerd := server.New()
	config := &OoyalaServerConfig{}
	_, err := toml.DecodeFile(managerd.Opts.ConfigFile, config)
	if err != nil {
		log.Fatalln(err)
	}

	var bldr builder.Builder
	if config.JenkinsURI != "" {
		log.Printf("Initializing Jenkins Builder with URI: %s", config.JenkinsURI)
		bldr = builder.NewJenkinsBuilder(config.JenkinsURI, "Jenkins Builder")
	} else if config.SimpleBuilderHost != "" {
		uri := "http://" + config.SimpleBuilderHost
		log.Printf("Initializing Simple Builder with URI: %s", uri)
		bldr = builder.NewSimpleBuilder(uri, 120*time.Second)
	} else {
		log.Printf("No builder configured")
	}

	managerd.Run(bldr)
}