Exemple #1
0
// Provision provisions the given *boson.Build
func (b *Builder) Provision(build *Build) bool {
	ret := true
	for i := range build.Config.Provisioner {
		Provisioners[i].OnStart()
		ContainerArgs, ContainerVolumes := Provisioners[i].Process(build)

		if ok, _ := utils.ContainerDeploy(build.Config, ContainerArgs, ContainerVolumes, "LATEST-PROVISIONED"); ok == false {
			ret = false
		}

	}
	return ret
}
Exemple #2
0
// Run runs the given *boson.Build
func (b *Builder) Run(build *Build) (bool, error) {

	log.Info(">> Build " + build.PrevCommit + " --> " + build.Commit)

	ContainerArgs, ContainerVolumes := Preprocessors[build.Config.PreProcessor].Process(build)

	log.Info(">> Running build on " + b.Config.DockerImage)
	//Save state
	ok := false
	var err error
	ok, err = utils.ContainerDeploy(build.Config, ContainerArgs, ContainerVolumes, build.Commit)

	for i := range Postprocessors {
		Postprocessors[i].Process(build)
	}
	return ok, err
}