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 }
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) })