Merge pull request #22 from itscaro/qtran/issue-2118
(fix) chartify process when chart path is absolute
This commit is contained in:
		
						commit
						d0841c72aa
					
				|  | @ -100,7 +100,10 @@ func (st *HelmState) PrepareChartify(helm helmexec.Interface, release *ReleaseSp | ||||||
| 
 | 
 | ||||||
| 	var shouldRun bool | 	var shouldRun bool | ||||||
| 
 | 
 | ||||||
| 	dir := filepath.Join(st.basePath, chart) | 	dir := chart | ||||||
|  | 	if !filepath.IsAbs(chart) { | ||||||
|  | 		dir = filepath.Join(st.basePath, chart) | ||||||
|  | 	} | ||||||
| 	if stat, _ := os.Stat(dir); stat != nil && stat.IsDir() { | 	if stat, _ := os.Stat(dir); stat != nil && stat.IsDir() { | ||||||
| 		if exists, err := st.fileExists(filepath.Join(dir, "Chart.yaml")); err == nil && !exists { | 		if exists, err := st.fileExists(filepath.Join(dir, "Chart.yaml")); err == nil && !exists { | ||||||
| 			shouldRun = true | 			shouldRun = true | ||||||
|  | @ -180,6 +183,7 @@ func (st *HelmState) PrepareChartify(helm helmexec.Interface, release *ReleaseSp | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if shouldRun { | 	if shouldRun { | ||||||
|  | 		st.logger.Debugf("Chartify process for %s", dir) | ||||||
| 		generatedFiles, err := st.generateValuesFiles(helm, release, workerIndex) | 		generatedFiles, err := st.generateValuesFiles(helm, release, workerIndex) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			return nil, clean, err | 			return nil, clean, err | ||||||
|  |  | ||||||
|  | @ -0,0 +1,7 @@ | ||||||
|  | helmDefaults: | ||||||
|  |   wait: true | ||||||
|  |   waitForJobs: true | ||||||
|  |   timeout: 300 | ||||||
|  | releases: | ||||||
|  | - name: argo-cd-crds | ||||||
|  |   chart: git::https://github.com/argoproj/argo-helm.git@charts/argo-cd/crds?ref=master | ||||||
|  | @ -159,6 +159,9 @@ if [[ helm_major_version -eq 3 ]]; then | ||||||
| 
 | 
 | ||||||
|   info "https://github.com/roboll/helmfile/issues/1867" |   info "https://github.com/roboll/helmfile/issues/1867" | ||||||
|   (${helmfile} -f ${dir}/issue.1867.yaml template 1>/dev/null) || fail "\"helmfile template\" shouldn't fail" |   (${helmfile} -f ${dir}/issue.1867.yaml template 1>/dev/null) || fail "\"helmfile template\" shouldn't fail" | ||||||
|  | 
 | ||||||
|  |   info "https://github.com/roboll/helmfile/issues/2118" | ||||||
|  |   (${helmfile} -f ${dir}/issue.2118.yaml template 1>/dev/null) || fail "\"helmfile template\" shouldn't fail" | ||||||
| else | else | ||||||
|   info "There are no regression tests for helm 2 because all the target charts have dropped helm 2 support." |   info "There are no regression tests for helm 2 because all the target charts have dropped helm 2 support." | ||||||
| fi | fi | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue