示例#1
0
func makeLocalDocker(dir string) error {
	desc, err := util.ReadTestDescription(dir)
	if err != nil {
		return err
	}
	imageNameVersion := fmt.Sprintf("%s/%s:%s", imagePrefix, desc.Name, "latest")
	if err != nil {
		return err
	}

	err = util.MakeImage(dir, desc, imageNameVersion)
	if err != nil {
		return err
	}

	return nil
}
示例#2
0
文件: main.go 项目: iron-io/lambda
func addToIron(dir string) error {
	desc, err := util.ReadTestDescription(dir)
	if err != nil {
		return err
	}

	version := uuid.NewV4().String()
	imageNameVersion := fmt.Sprintf("%s/%s:%s", imagePrefix, desc.Name, version)

	err = util.MakeImage(dir, desc, imageNameVersion)
	if err != nil {
		return err
	}

	opts := iron_lambda.PushImageOptions{imageNameVersion, NewDockerJsonWriter(os.Stdout), true}
	err = iron_lambda.PushImage(opts)
	if err != nil {
		return err
	}

	return iron_lambda.RegisterWithIron(imageNameVersion)
}