Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func GetCommands() []cli.Command {
UsageText: helmcommand.GetArguments(),
ArgsUsage: common.CreateEnvVars(),
SkipFlagParsing: true,
HideHelp: true,
Hidden: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the conan one?

BashComplete: corecommon.CreateBashCompletionFunc(),
Category: buildToolsCategory,
Action: HelmCmd,
Expand Down Expand Up @@ -1437,6 +1437,9 @@ func extractHelmServerDetails(args []string) ([]string, *coreConfig.ServerDetail
if err != nil {
return cleanedArgs, nil, err
}
if serverDetails == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't there any case where serverDetails are not used to create config?

return cleanedArgs, nil, fmt.Errorf("no default server configuration found. Please configure a server using 'jfrog config add' or specify a server using --server-id")
}
return cleanedArgs, serverDetails, nil
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/jfrog/build-info-go v1.12.5-0.20251209171349-eb030db986f9
github.com/jfrog/gofrog v1.7.6
github.com/jfrog/jfrog-cli-application v1.0.2-0.20251208114900-b3cc968c8e3d
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251210120128-176c677fed4c
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251211071646-7cebb31a31f0
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20251210085744-f8481d179ac5
github.com/jfrog/jfrog-cli-evidence v0.8.3-0.20251204144808-73fa744851c0
github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20251205121610-171eb9b0000e
Expand Down Expand Up @@ -282,7 +282,7 @@ replace github.com/docker/docker => github.com/docker/docker v27.5.1+incompatibl

replace github.com/gfleury/go-bitbucket-v1 => github.com/gfleury/go-bitbucket-v1 v0.0.0-20230825095122-9bc1711434ab

//replace github.com/jfrog/jfrog-cli-artifactory => github.com/naveenku-jfrog/jfrog-cli-artifactory v0.0.0-20251129184826-6834d2c05c2e
//replace github.com/jfrog/jfrog-cli-artifactory => github.com/naveenku-jfrog/jfrog-cli-artifactory v0.0.0-20251210184507-0c8d138690cb

//replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20251006061821-8b1be6a65215

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1216,8 +1216,8 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
github.com/jfrog/jfrog-cli-application v1.0.2-0.20251208114900-b3cc968c8e3d h1:0o6tj4nPP9uCscyfPbKBUcCaIYof42irwii6XsBB8zM=
github.com/jfrog/jfrog-cli-application v1.0.2-0.20251208114900-b3cc968c8e3d/go.mod h1:xum2HquWO5uExa/A7MQs3TgJJVEeoqTR+6Z4mfBr1Xw=
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251210120128-176c677fed4c h1:uMs18TfF/472CsaoI3HAsvyo9B8ChFh855BdicqoT4c=
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251210120128-176c677fed4c/go.mod h1:7cCaRhXorlbyXZgiW5bplCExFxlnROaG21K12d8inpQ=
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251211071646-7cebb31a31f0 h1:NbMgMcU2I+zdBWbwZagbKwmsmY96ikNatpwMs0M1Kv8=
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251211071646-7cebb31a31f0/go.mod h1:7cCaRhXorlbyXZgiW5bplCExFxlnROaG21K12d8inpQ=
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20251210085744-f8481d179ac5 h1:GYE67ubwl+ZRw3CcXFUi49EwwQp6k+qS8sX0QuHDHO8=
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20251210085744-f8481d179ac5/go.mod h1:BMoGi2rG0udCCeaghqlNgiW3fTmT+TNnfTnBoWFYgcg=
github.com/jfrog/jfrog-cli-evidence v0.8.3-0.20251204144808-73fa744851c0 h1:8S1vE1PeVtrzWkKL0N39cX6XLLNV0It+f6xjRKjw7Ug=
Expand Down
25 changes: 25 additions & 0 deletions helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"time"

buildinfo "github.com/jfrog/build-info-go/entities"
"github.com/jfrog/jfrog-cli-core/v2/utils/config"
"github.com/jfrog/jfrog-cli-core/v2/utils/coreutils"
coreTests "github.com/jfrog/jfrog-cli-core/v2/utils/tests"
"github.com/jfrog/jfrog-cli/utils/tests"
Expand All @@ -41,6 +42,23 @@ func initHelmTest(t *testing.T) {
if artifactoryCli == nil {
initArtifactoryCli()
}

// Set up home directory configuration so GetDefaultServerConf() can find the server
createJfrogHomeConfig(t, true)

// Initialize serverDetails for Helm tests (similar to maven_test.go)
serverDetails = &config.ServerDetails{
Url: *tests.JfrogUrl,
ArtifactoryUrl: *tests.JfrogUrl + tests.ArtifactoryEndpoint,
SshKeyPath: *tests.JfrogSshKeyPath,
SshPassphrase: *tests.JfrogSshPassphrase,
}
if *tests.JfrogAccessToken != "" {
serverDetails.AccessToken = *tests.JfrogAccessToken
} else {
serverDetails.User = *tests.JfrogUser
serverDetails.Password = *tests.JfrogPassword
}
}

func isArtifactoryAccessible(t *testing.T) bool {
Expand Down Expand Up @@ -368,6 +386,13 @@ spec:
err = os.WriteFile(filepath.Join(templatesDir, "deployment.yaml"), []byte(deploymentYaml), 0644)
require.NoError(t, err)

// Create an empty Chart.lock file for charts without dependencies
// This is required because Helm FlexPack tries to read Chart.lock even when it doesn't exist
chartLockYaml := `dependencies: []
`
err = os.WriteFile(filepath.Join(chartDir, "Chart.lock"), []byte(chartLockYaml), 0644)
require.NoError(t, err)

return chartDir
}

Expand Down
Loading