Exemplo n.º 1
0
func (p DeployDebian) Uninstall(data manifest.Manifest) error {
	if err := utils.RunSshCmd(
		data.GetString("cluster"),
		data.GetString("ssh-user"),
		fmt.Sprintf("sudo apt-get purge %s -y", data.GetString("package")),
	); err != nil {
		return err
	}

	return utils.DeletePluginData("deploy.debian", data.GetString("app-name"), data.GetString("consul-address"))
}
Exemplo n.º 2
0
func (p ReleaseDebian) Run(data manifest.Manifest) error {
	return utils.RunSshCmd(
		data.GetString("cluster"),
		data.GetString("ssh-user"),
		fmt.Sprintf(
			"sudo %s/debian-way/release.sh --package='%s' --site='%s' --mode='%s'",
			data.GetString("ci-tools-path"),
			data.GetString("package"),
			data.GetString("site"),
			data.GetString("mode"),
		),
	)
}