예제 #1
0
파일: watch.go 프로젝트: mmb/boosh
func watch(name string) {
	deployer := deployer.New(cloudformation.NewFromEnv())

	events := make(chan *cloudformation.StackEvent)

	go deployer.Watch(events, name)

	ok := streamEvents(events)
	if !ok {
		fmt.Println()
		fatal(ansi.Color("formation failed and was rolled back", "yellow"))
	}
}
예제 #2
0
파일: deploy.go 프로젝트: mmb/boosh
func deploy(name string, source io.Reader) {
	template, err := ioutil.ReadAll(source)
	if err != nil {
		fatal(err)
	}

	deployer := deployer.New(cloudformation.NewFromEnv())

	events, err := deployer.Deploy(name, template)
	if err != nil {
		panic(err)
	}

	ok := streamEvents(events)
	if !ok {
		fmt.Println()
		fatal(ansi.Color("formation failed and was rolled back", "yellow"))
	}
}