A big progress
A big progress
This commit is contained in:
@ -35,7 +35,6 @@ type Release struct {
|
||||
// Private fields that should be pupulated during the run-time
|
||||
RepositoryObj *repository.Repository `yaml:"-"`
|
||||
ChartObj *chart.Chart `yaml:"-"`
|
||||
MirrorObj *mirror.Mirror `yaml:"-"`
|
||||
DestValues ValuesHolders `yaml:"-"`
|
||||
DestSecrets ValuesHolders `yaml:"-"`
|
||||
}
|
||||
@ -98,7 +97,7 @@ func (r *Release) MirrorObjFromName(mirrors mirror.Mirrors) error {
|
||||
}
|
||||
}
|
||||
if r.RepositoryObj == nil {
|
||||
return fmt.Errorf("couldn't gather the RepositoryObj for %s", r.Repository)
|
||||
return fmt.Errorf("couldn't gather the RepositoryObj from mirror for %s", r.Repository)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -249,11 +248,17 @@ func (src Releases) Diff(dest Releases) Diff {
|
||||
return diff
|
||||
}
|
||||
|
||||
func (rs *Releases) PopulateRepositories(repos repository.Repositories) error {
|
||||
func (rs *Releases) PopulateRepositories(repos repository.Repositories, mirrors mirror.Mirrors) error {
|
||||
for _, r := range *rs {
|
||||
if len(r.Mirror) > 0 {
|
||||
if err := r.MirrorObjFromName(mirrors); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if err := r.RepositoryObjFromName(repos); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user