test
This commit is contained in:
@@ -21,6 +21,8 @@ type InstallClass struct {
|
||||
tools []tool.ToolData
|
||||
toolsBin map[string]string
|
||||
charts []chart.ChartRepoData
|
||||
|
||||
commandHelm helm.HelmCommandInterface
|
||||
}
|
||||
|
||||
func (this *InstallClass) NewInstall() (string, error) {
|
||||
@@ -61,22 +63,22 @@ func (this *InstallClass) NewInstall() (string, error) {
|
||||
return dst, err
|
||||
}
|
||||
|
||||
bin_path, _ := this.getToolBin("helm")
|
||||
fmt.Println("Install 67 bin_path", bin_path)
|
||||
|
||||
return dst, nil
|
||||
}
|
||||
|
||||
|
||||
func (this *InstallClass) ChartRepo() (error) {
|
||||
|
||||
bin_path, _ := this.getToolBin("helm")
|
||||
|
||||
for _, v := range this.charts {
|
||||
if v.Repository.Name != "" {
|
||||
log.Log().Info().Msg(fmt.Sprintf(" >> Helm Repo : %s", v.Repository.Name))
|
||||
repo := helm.HelmRepo{Bin: bin_path,
|
||||
Name: v.Repository.Name,
|
||||
Repository: v.Repository.Url,
|
||||
ForceUpdate: v.Repository.ForceUpdate}
|
||||
res, err := repo.AddRepository()
|
||||
repo := helm.HelmRepo{Name: v.Repository.Name,
|
||||
Repository: v.Repository.Url,
|
||||
ForceUpdate: v.Repository.ForceUpdate}
|
||||
res, err := this.commandHelm.AddRepository(repo)
|
||||
if err != nil {
|
||||
log.Log().Info().Msg(fmt.Sprintf(" << %s ", err))
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user