Skip to content

Commit aa83466

Browse files
Merge pull request #71 from codefresh-io/CR-10462-new-release-v2.1.14
For backwards compatibility, if we have no repo type assume it is git
2 parents 379e3ba + 7075efb commit aa83466

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

reposerver/repository/repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ func (s *Service) runManifestGen(repoRoot, commitSHA, cacheKey string, ctxSrc op
331331
var err error
332332
var gitClient git.Client
333333

334-
if q.Repo.Type == "git" {
334+
if q.Repo.Type != "helm" {
335335
gitClient, _, err = s.newClientResolveRevision(q.Repo, q.Revision)
336336
}
337337
if err != nil {

reposerver/repository/repository_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func TestGenerateManifests_EmptyCache(t *testing.T) {
204204
func TestHelmManifestFromChartRepo(t *testing.T) {
205205
service := newService(".")
206206
source := &argoappv1.ApplicationSource{Chart: "my-chart", TargetRevision: ">= 1.0.0"}
207-
request := &apiclient.ManifestRequest{Repo: &argoappv1.Repository{}, ApplicationSource: source, NoCache: true}
207+
request := &apiclient.ManifestRequest{Repo: &argoappv1.Repository{Type: "helm"}, ApplicationSource: source, NoCache: true}
208208
response, err := service.GenerateManifest(context.Background(), request)
209209
assert.NoError(t, err)
210210
assert.NotNil(t, response)
@@ -746,7 +746,7 @@ func TestHelmManifestFromChartRepoWithValueFile(t *testing.T) {
746746
ValueFiles: []string{"./my-chart-values.yaml"},
747747
},
748748
}
749-
request := &apiclient.ManifestRequest{Repo: &argoappv1.Repository{}, ApplicationSource: source, NoCache: true}
749+
request := &apiclient.ManifestRequest{Repo: &argoappv1.Repository{Type: "helm"}, ApplicationSource: source, NoCache: true}
750750
response, err := service.GenerateManifest(context.Background(), request)
751751
assert.NoError(t, err)
752752
assert.NotNil(t, response)
@@ -779,7 +779,7 @@ func TestHelmManifestFromChartRepoWithValueFileOutsideRepo(t *testing.T) {
779779
ValueFiles: []string{"../my-chart-2/my-chart-2-values.yaml"},
780780
},
781781
}
782-
request := &apiclient.ManifestRequest{Repo: &argoappv1.Repository{}, ApplicationSource: source, NoCache: true}
782+
request := &apiclient.ManifestRequest{Repo: &argoappv1.Repository{Type: "helm"}, ApplicationSource: source, NoCache: true}
783783
_, err := service.GenerateManifest(context.Background(), request)
784784
assert.Error(t, err)
785785
}
@@ -794,7 +794,7 @@ func TestHelmManifestFromChartRepoWithValueFileLinks(t *testing.T) {
794794
ValueFiles: []string{"my-chart-link.yaml"},
795795
},
796796
}
797-
request := &apiclient.ManifestRequest{Repo: &argoappv1.Repository{}, ApplicationSource: source, NoCache: true}
797+
request := &apiclient.ManifestRequest{Repo: &argoappv1.Repository{Type: "helm"}, ApplicationSource: source, NoCache: true}
798798
_, err := service.GenerateManifest(context.Background(), request)
799799
assert.NoError(t, err)
800800
})

0 commit comments

Comments
 (0)