Пример #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
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)
}