Skip to content

Commit 650af64

Browse files
committed
feat: create package alias for helm
Allows intercepting helm CLI calls to be intercepted by jfrog CLI. We use helm-maven-plugin in our builds, which under the hood executes `helm dependency`, `helm package` and `helm push` commands. Without this feature we only have a dirty workaround to create a shim which mimics package aliasing feature in order to capture helm chart in a build-info. This allows us to keep using `helm-maven-plugin` and indirectly invoke `jf helm` to record the build-info along with maven artifacts. **Feature was originally requested as a support ticket 427008**
1 parent 4a1c1bc commit 650af64

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

ghostfrog_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,11 @@ func TestGhostFrogHighFanOutStress(t *testing.T) {
468468
// E2E-030: setup-jfrog-cli native integration
469469
func TestGhostFrogSetupJFrogCLINativeIntegration(t *testing.T) {
470470
homeDir := initGhostFrogTest(t)
471-
installAliases(t, "npm,mvn,go,pip")
471+
tools := []string{"npm", "mvn", "go", "pip", "helm"}
472+
installAliases(t, strings.Join(tools, ","))
472473

473474
binDir := aliasBinDir(homeDir)
474-
for _, tool := range []string{"npm", "mvn", "go", "pip"} {
475+
for _, tool := range tools {
475476
_, err := os.Stat(aliasToolPath(homeDir, tool))
476477
require.NoError(t, err, "alias for %s should exist", tool)
477478
}
@@ -484,7 +485,7 @@ func TestGhostFrogSetupJFrogCLINativeIntegration(t *testing.T) {
484485
// Verify alias dir is populated
485486
entries, err := os.ReadDir(binDir)
486487
require.NoError(t, err)
487-
assert.GreaterOrEqual(t, len(entries), 4, "should have at least 4 alias entries")
488+
assert.GreaterOrEqual(t, len(entries), len(tools), fmt.Sprintf("should have at least %d alias entries", len(tools)))
488489
}
489490

490491
// E2E-031: Auto build-info publish (requires Artifactory)

packagealias/packagealias.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ var SupportedTools = []string{
3333
"docker",
3434
"gem",
3535
"bundle",
36+
"helm",
3637
}
3738

3839
// AliasMode represents how a tool should be handled

0 commit comments

Comments
 (0)