feat(JFrogCliV2): add Package Alias (Ghost Frog) support - #652
Open
SierraNL wants to merge 1 commit into
Open
Conversation
Adds an opt-in 'enablePackageAlias' input (with 'packageAliasTools'
to scope which tools) that installs JFrog CLI's package-alias
("Ghost Frog") shims, so native build tool calls (npm, mvn, gradle,
dotnet, nuget, pip, go, docker, etc.) transparently route through
'jf' for the rest of the pipeline job.
Requires JFrog CLI >= 2.93.0 (jfrog-tasks-utils/utils.js:
minSupportedPackageAliasCliVersion, following the existing
minSupported*CliVersion pattern); on older versions the task warns
and skips Package Alias setup rather than failing.
Split out of jfrog#637 per reviewer feedback, as an independent PR (not
stacked on any of the other split-out PRs) so it can be reviewed and
merged on its own.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reasons
Split out of #637 per reviewer feedback - the original PR bundled a few independent changes into one. This PR contains only the Package Alias scenario. It is independent of the other two split-out PRs (#650 register-in-PATH, #651 persist/reuse config) and can be reviewed/merged on its own, in any order.
Summary
Adds an opt-in
enablePackageAliasinput (defaultfalse) toJFrogCliV2that installs JFrog CLI'spackage-alias("Ghost Frog") shims (requires CLI ≥ 2.93.0; warns and skips on older versions instead of failing) so native build tool calls (npm, mvn, gradle, dotnet, nuget, pip, go, docker, etc.) route throughjffor the rest of the pipeline job.packageAliasTools(optional) scopes which tools get aliased.Added
minSupportedPackageAliasCliVersion(2.93.0) constant tojfrog-tasks-utils/utils.js, following the existingminSupported*CliVersionpattern.All new behavior is off by default, so existing pipelines using
JFrogCliV2are unaffected.Test plan
node --check tasks/JFrogCliV2/jfrogCliRun.jsandjfrog-tasks-utils/utils.jstasks/JFrogCliV2/task.jsonparses as valid JSONtests/resources/jfrogCliV2PackageAlias/(+ a newdescribeblock intests/tests.ts), following the existingtests/resources/<taskDir>/<scenario>.js+mockTask/runSyncTestpattern:enablePackageAlias=trueon a supported CLI version runspackage-alias installand setsJFROG_CLI_GHOST_FROG.enablePackageAlias=trueon a CLI version below2.93.0logs a warning, skips Package Alias setup, and the task still succeeds.Note on CI
The
Testsworkflow is apull_request_targetworkflow gated behind asafe to testlabel, and for fork PRs GitHub always runs the base branch's copy of that workflow file (a built-in security control against fork PRs granting themselves elevated permissions) - so a maintainer needs to add the label for the integration tests above to actually execute in CI. This can't be changed from the PR branch itself.🤖 Generated with Claude Code