示例#1
0
文件: main.go 项目: crowley-io/pack
func run(dck docker.Docker, cnf *configuration.Configuration) error {

	ls := docker.NewLogStream()

	start("install")
	if err := install.Install(dck, ls, cnf); err != nil {
		return err
	}

	start("compose")
	if err := compose.Compose(dck, ls, cnf); err != nil {
		return err
	}

	start("publish")
	if err := publish.Publish(dck, ls, cnf); err != nil {
		return err
	}

	return nil
}
示例#2
0
import (
	"errors"
	"github.com/crowley-io/pack/configuration"
	"github.com/crowley-io/pack/docker"

	. "github.com/crowley-io/pack/publish"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Publish", func() {

	var (
		c   *configuration.Configuration
		ls  = docker.NewLogStream()
		d   *docker.Mock
		err error
	)

	Describe("push an image into a registy", func() {
		Context("when the configuration is valid", func() {
			BeforeEach(func() {

				c = getDefaultConfiguration()
				d = docker.NewMock()

			})
			JustBeforeEach(func() {
				err = Publish(d, ls, c)
			})