Beispiel #1
0
// deployCmds returns the commands that is used when provisioner
// deploy an unit.
func deployCmds(app provision.App, version string) ([]string, error) {
	deployCmd, err := config.GetString("docker:deploy-cmd")
	if err != nil {
		return nil, err
	}
	appRepo := repository.ReadOnlyURL(app.GetName())
	var envs string
	for _, env := range app.Envs() {
		envs += fmt.Sprintf("%s='%s' ", env.Name, env.Value)
	}
	cmds := []string{deployCmd, appRepo, version, envs}
	return cmds, nil
}