Skip to content

Commit

Permalink
Merge pull request #985 from spring-financial-group/checkout-patterns
Browse files Browse the repository at this point in the history
fix: Check out jx-requirements.yml from cluster repo upon sparse checkout
  • Loading branch information
jenkins-x-bot authored Nov 7, 2024
2 parents c836b2c + e2bf7ac commit a81ab76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/cmd/helm/release/release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func TestStepHelmReleaseWithChartPages(t *testing.T) {
CLI: runner.OrderedCommands[0].Name + " " + strings.Join(runner.OrderedCommands[0].Args, " "),
},
fakerunner.FakeResult{
CLI: "git sparse-checkout set --no-cone .jx/gitops/source-config.yaml",
CLI: "git sparse-checkout set --no-cone jx-requirements.yml .jx/gitops/source-config.yaml",
},
fakerunner.FakeResult{
CLI: "git checkout",
Expand Down Expand Up @@ -225,7 +225,7 @@ func TestStepHelmReleaseWithOCIUsingUserName(t *testing.T) {
CLI: runner.OrderedCommands[0].Name + " " + strings.Join(runner.OrderedCommands[0].Args, " "),
},
fakerunner.FakeResult{
CLI: "git sparse-checkout set --no-cone .jx/gitops/source-config.yaml",
CLI: "git sparse-checkout set --no-cone jx-requirements.yml .jx/gitops/source-config.yaml",
},
fakerunner.FakeResult{
CLI: "git checkout",
Expand Down Expand Up @@ -270,7 +270,7 @@ func TestStepHelmReleaseWithOCIUsingRegistryConfig(t *testing.T) {
CLI: runner.OrderedCommands[0].Name + " " + strings.Join(runner.OrderedCommands[0].Args, " "),
},
fakerunner.FakeResult{
CLI: "git sparse-checkout set --no-cone .jx/gitops/source-config.yaml",
CLI: "git sparse-checkout set --no-cone jx-requirements.yml .jx/gitops/source-config.yaml",
},
fakerunner.FakeResult{
CLI: "git checkout",
Expand Down Expand Up @@ -310,7 +310,7 @@ func TestStepHelmReleaseWithOCINoOCILogin(t *testing.T) {
CLI: runner.OrderedCommands[0].Name + " " + strings.Join(runner.OrderedCommands[0].Args, " "),
},
fakerunner.FakeResult{
CLI: "git sparse-checkout set --no-cone .jx/gitops/source-config.yaml",
CLI: "git sparse-checkout set --no-cone jx-requirements.yml .jx/gitops/source-config.yaml",
},
fakerunner.FakeResult{
CLI: "git checkout",
Expand Down
3 changes: 2 additions & 1 deletion pkg/variablefinders/requirements.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ func GetSettings(g gitclient.Interface, jxClient jxc.Interface, ns, dir, owner,
return nil, "", errors.New("failed to find a dev environment source url on development environment resource")
}
}
clusterDir, err := requirements.PartialCloneClusterRepo(g, gitURL, true, sourceconfigs.SourceConfigFile)
combinedConfigFiles := []string{jxcore.RequirementsConfigFileName, sourceconfigs.SourceConfigFile}
clusterDir, err := requirements.PartialCloneClusterRepo(g, gitURL, true, combinedConfigFiles...)
if err != nil {
return nil, "", err
}
Expand Down

0 comments on commit a81ab76

Please sign in to comment.