Skip to content

Introduces package-alias support to the setup-jfrog-cli action (#332)#341

Open
agrasth wants to merge 1 commit into
masterfrom
package-alias
Open

Introduces package-alias support to the setup-jfrog-cli action (#332)#341
agrasth wants to merge 1 commit into
masterfrom
package-alias

Conversation

@agrasth
Copy link
Copy Markdown

@agrasth agrasth commented Jun 8, 2026

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • I used npm run format for formatting the code before submitting the pull request.

Summary

This PR introduces package-alias support to the setup-jfrog-cli action. Package-alias (codenamed "GhostFrog") enables transparent interception of native package manager commands (mvn, docker, npm, go, pip, etc.) and routes them
through JFrog CLI automatically, without requiring users to change their build scripts to use the jf prefix.

What's New

New Action Inputs

  • enable-package-alias (boolean, default: false) — Enable package aliasing
  • package-alias-tools (string, comma-separated list) — Which tools to alias (e.g., mvn,docker,npm)

How It Works

When enabled, the action:

  1. Runs jf package-alias install to create thin shims for specified tools
  2. Adds ~/.jfrog/package-alias/bin/ to PATH
  3. Expects JFROG_CLI_GHOST_FROG=true in job-level environment (enables shim interception)

When a user runs mvn deploy, the shim intercepts it and rewrites it to jf mvn deploy transparently, preserving all JFrog integrations (Artifactory routing, build-info, etc.).

Supported Tools

mvn, gradle, npm, yarn, go, pip, pipenv, poetry, dotnet, nuget, docker, pnpm, gem, bundle

Usage Example

env:
  JFROG_CLI_GHOST_FROG: "true"  # Required — enables the shim interception

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up JFrog CLI with package aliases
        uses: jfrog/setup-jfrog-cli@package-alias
        with:
          version: 2.105.0
          enable-package-alias: true
          package-alias-tools: mvn,docker
        env:
          JF_URL: ${{ secrets.JF_URL }}
          JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}

      - name: Build with Maven
        run: mvn clean deploy
        # No 'jf' prefix needed; GhostFrog intercepts and routes to 'jf mvn'

@agrasth agrasth changed the title Add package alias (#332) Introduces package-alias support to the setup-jfrog-cli action (#332) Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants