pelotech / drone-helm3

Plugin for drone to deploy helm charts using helm3
Apache License 2.0
31 stars 36 forks source link

More-idiomatic initialization of Steps #73

Closed ErinCall closed 4 years ago

ErinCall commented 4 years ago

For #67

The main thrust of this change is to use the go convention of NewTHING functions to initialize the structs in internal/run instead of constructing struct literals in plan.go. Unfortunately, it'ss a big honkin' diff that touches almost every source file in the repo. It's probably easier to read in two chunks:

  1. Initialize the various Steps with NewSTEPNAME functions
  2. Firm up the separation-of-concerns boundary between the run and helm packages

Alternatively, starting with the diffs for internal/helm/plan.go and internal/run/depupdate.go should give you a reasonably-clear overview of what's happened--plan.go shows how the run package's public interface has changed, while depupdate.go is a fairly short file that demonstrates the changes to the Steps.

Pre-merge checklist: