Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
store helm chart url (#212)
Browse files Browse the repository at this point in the history
* store helm chart url

* put url in chart metadata instead
  • Loading branch information
kherroWisc authored Jul 31, 2018
1 parent c65927b commit 47d2f1a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions pkg/api/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type HelmChartMetadata struct {
Icon string `json:"icon" yaml:"icon" hcl:"icon" meta:"icon"`
Name string `json:"name" yaml:"name" hcl:"name" meta:"name"`
Readme string `json:"readme" yaml:"readme" hcl:"readme" meta:"readme"`
URL string `json:"url" yaml:"url" hcl:"url" meta:"url"`
}

// ReleaseMetadata
Expand Down
25 changes: 12 additions & 13 deletions pkg/lifecycle/daemon/ui.bindatafs.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
package daemon

import (
"github.com/elazarl/go-bindata-assetfs"
"bytes"
"compress/gzip"
"fmt"
Expand All @@ -20,8 +21,6 @@ import (
"path/filepath"
"strings"
"time"

"github.com/elazarl/go-bindata-assetfs"
)

func bindataRead(data []byte, name string) ([]byte, error) {
Expand Down Expand Up @@ -247,12 +246,12 @@ func AssetNames() []string {

// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"dist/b3d517c0409239a363a3c18ce9a0eda2.png": distB3d517c0409239a363a3c18ce9a0eda2Png,
"dist/commons~main.b96cc465c906381ec778.js": distCommonsMainB96cc465c906381ec778Js,
"dist/b3d517c0409239a363a3c18ce9a0eda2.png": distB3d517c0409239a363a3c18ce9a0eda2Png,
"dist/commons~main.b96cc465c906381ec778.js": distCommonsMainB96cc465c906381ec778Js,
"dist/commons~main.b96cc465c906381ec778.js.map": distCommonsMainB96cc465c906381ec778JsMap,
"dist/index.html": distIndexHtml,
"dist/main.b96cc465c906381ec778.js": distMainB96cc465c906381ec778Js,
"dist/main.b96cc465c906381ec778.js.map": distMainB96cc465c906381ec778JsMap,
"dist/index.html": distIndexHtml,
"dist/main.b96cc465c906381ec778.js": distMainB96cc465c906381ec778Js,
"dist/main.b96cc465c906381ec778.js.map": distMainB96cc465c906381ec778JsMap,
}

// AssetDir returns the file names below a certain
Expand Down Expand Up @@ -294,15 +293,14 @@ type bintree struct {
Func func() (*asset, error)
Children map[string]*bintree
}

var _bintree = &bintree{nil, map[string]*bintree{
"dist": &bintree{nil, map[string]*bintree{
"b3d517c0409239a363a3c18ce9a0eda2.png": &bintree{distB3d517c0409239a363a3c18ce9a0eda2Png, map[string]*bintree{}},
"commons~main.b96cc465c906381ec778.js": &bintree{distCommonsMainB96cc465c906381ec778Js, map[string]*bintree{}},
"b3d517c0409239a363a3c18ce9a0eda2.png": &bintree{distB3d517c0409239a363a3c18ce9a0eda2Png, map[string]*bintree{}},
"commons~main.b96cc465c906381ec778.js": &bintree{distCommonsMainB96cc465c906381ec778Js, map[string]*bintree{}},
"commons~main.b96cc465c906381ec778.js.map": &bintree{distCommonsMainB96cc465c906381ec778JsMap, map[string]*bintree{}},
"index.html": &bintree{distIndexHtml, map[string]*bintree{}},
"main.b96cc465c906381ec778.js": &bintree{distMainB96cc465c906381ec778Js, map[string]*bintree{}},
"main.b96cc465c906381ec778.js.map": &bintree{distMainB96cc465c906381ec778JsMap, map[string]*bintree{}},
"index.html": &bintree{distIndexHtml, map[string]*bintree{}},
"main.b96cc465c906381ec778.js": &bintree{distMainB96cc465c906381ec778Js, map[string]*bintree{}},
"main.b96cc465c906381ec778.js.map": &bintree{distMainB96cc465c906381ec778JsMap, map[string]*bintree{}},
}},
}}

Expand Down Expand Up @@ -353,6 +351,7 @@ func _filePath(dir, name string) string {
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}


func assetFS() *assetfs.AssetFS {
assetInfo := func(path string) (os.FileInfo, error) {
return os.Stat(path)
Expand Down
3 changes: 3 additions & 0 deletions pkg/specs/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ func (r *Resolver) ResolveChartMetadata(ctx context.Context, path string) (api.H
return api.HelmChartMetadata{}, errors.Wrapf(err, "get chart and read me at %s", path)
}

debug.Log("phase", "save-chart-url", "url", path)
md.URL = path

localChartPath := filepath.Join(constants.KustomizeHelmPath, "Chart.yaml")
debug.Log("phase", "read-chart", "from", localChartPath)
chart, err := r.FS.ReadFile(localChartPath)
Expand Down

0 comments on commit 47d2f1a

Please sign in to comment.