示例#1
0
文件: test.go 项目: vcaputo/cnt
func discoverAndRunTestType(path string, args builder.BuildArgs) {
	if cnt, err := builder.NewAci(path, args); err == nil {
		cnt.Test()
	} else if pod, err := builder.OpenPod(path, args); err == nil {
		pod.Test()
	} else {
		panic("Cannot find cnt-manifest.yml")
	}
}
示例#2
0
文件: graph.go 项目: vcaputo/cnt
func discoverAndRunGraphType(path string, args builder.BuildArgs) {
	if cnt, err := builder.NewAci(path, args); err == nil {
		cnt.Graph()
	} else if pod, err2 := builder.OpenPod(path, args); err2 == nil {
		pod.Graph()
	} else {
		panic("Cannot find cnt-manifest.yml or cnt-pod-manifest.yml" + err.Error() + err2.Error())
	}
}
示例#3
0
文件: update.go 项目: vcaputo/cnt
func discoverAndRunUpdateType(path string, args builder.BuildArgs) {
	if cnt, err := builder.NewAci(path, args); err == nil {
		cnt.UpdateConf()
	} else if _, err := builder.OpenPod(path, args); err == nil {
		panic("Not Yet implemented for pods")
	} else {
		panic("Cannot find cnt-manifest.yml")
	}
}
示例#4
0
文件: cnt.go 项目: PrFalken/cnt
func discoverAndRunCleanType(path string, args builder.BuildArgs) {
	if cnt, err := builder.NewAci(path, args); err == nil {
		cnt.Clean()
	} else if pod, err := builder.OpenPod(path, args); err == nil {
		pod.Clean()
	} else {
		log.Get().Panic("Cannot find cnt-manifest.yml")
	}
}