ipedrazas / drone-helm

Helm (Kubernetes) plugin for drone.io
MIT License
120 stars 90 forks source link

Needs to handle `promote` event in Drone v1.x #98

Closed one000mph closed 5 years ago

one000mph commented 5 years ago

I might be able to open a PR on this in a week or two. I recently upgraded to 1.2 and encountered this issue.

one000mph commented 5 years ago

I was able to fix this in my own image with

func setHelmCommand(p *Plugin) {

    switch p.Config.HelmCommand {
    case "upgrade":
        setUpgradeCommand(p)
    case "delete":
        setDeleteCommand(p)
    default:
        switch os.Getenv("DRONE_BUILD_EVENT") {
-       case "push", "tag", "deployment", "pull_request":
+       case "push", "tag", "deployment", "promote", "pull_request":
            setUpgradeCommand(p)
        case "delete":
            setDeleteCommand(p)
        default:
            setHelpCommand(p)
        }
    }

}
one000mph commented 5 years ago

oh huh, look like that is already there. nvm