Skip to content

feat(JFrogCliV2): add option to register JFrog CLI on agent PATH - #650

Open
SierraNL wants to merge 1 commit into
jfrog:devfrom
SierraNL:split/1-register-in-path
Open

feat(JFrogCliV2): add option to register JFrog CLI on agent PATH#650
SierraNL wants to merge 1 commit into
jfrog:devfrom
SierraNL:split/1-register-in-path

Conversation

@SierraNL

@SierraNL SierraNL commented Aug 25, 2026

Copy link
Copy Markdown

Summary

Split out of #637 per reviewer feedback (multiple independent changes bundled into one PR). This is one of 3 independent PRs split out of #637 - #651 (persist/reuse config) and #652 (Package Alias) are the other two. All three are independent and can be reviewed/merged in any order.

Adds an opt-in registerInPath input to JFrogCliV2. When enabled, the JFrog CLI executable's directory is prepended to the agent's PATH, so later steps in the same pipeline job can call jf directly without a separate install/config step.

This is off by default, so existing pipelines using JFrogCliV2 are unaffected.

Test plan

  • node --check tasks/JFrogCliV2/jfrogCliRun.js
  • Validated tasks/JFrogCliV2/task.json parses as valid JSON
  • Added an integration test (tests/resources/jfrogCliV2RegisterInPath/registerInPath.js + a new describe block in tests/tests.ts) asserting the task emits a ##vso[task.prependpath] logging command when registerInPath is enabled, following the existing tests/resources/<taskDir>/<scenario>.js + mockTask/runSyncTest pattern used by sibling tasks.

Note on CI

The Tests workflow is a pull_request_target workflow gated behind a safe to test label, 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 test above to actually execute in CI. This can't be changed from the PR branch itself.

🤖 Generated with Claude Code

Adds an opt-in 'registerInPath' input. When enabled, the JFrog CLI
executable's directory is prepended to the agent's PATH, so later
steps in the same pipeline job can call 'jf' directly without a
separate install/config step.

Split out of jfrog#637 per reviewer feedback to keep each change focused
and independently reviewable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant